mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-05 06:24:12 +01:00
Merge branch 'master' into xulmus
This commit is contained in:
@@ -1022,7 +1022,16 @@ function Buffer() //{{{
|
||||
}
|
||||
else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file")
|
||||
{
|
||||
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value});
|
||||
commandline.input("Upload file: ", function (path)
|
||||
{
|
||||
let file = io.getFile(path);
|
||||
|
||||
if (!file.exists())
|
||||
return liberator.beep();
|
||||
|
||||
elem.value = file.path;
|
||||
}
|
||||
, {completer: completion.file, default: elem.value});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1132,7 +1141,16 @@ function Buffer() //{{{
|
||||
}
|
||||
else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file")
|
||||
{
|
||||
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value});
|
||||
commandline.input("Upload file: ", function (path)
|
||||
{
|
||||
let file = io.getFile(path);
|
||||
|
||||
if (!file.exists())
|
||||
return liberator.beep();
|
||||
|
||||
elem.value = file.path;
|
||||
}
|
||||
, {completer: completion.file, default: elem.value});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -898,6 +898,7 @@ function Events() //{{{
|
||||
|
||||
let wasFeeding = this.feedingKeys;
|
||||
this.feedingKeys = true;
|
||||
this.duringFeed = this.duringFeed || "";
|
||||
let wasSilent = commandline.silent;
|
||||
if (silent)
|
||||
commandline.silent = silent;
|
||||
@@ -993,6 +994,15 @@ function Events() //{{{
|
||||
this.feedingKeys = wasFeeding;
|
||||
if (silent)
|
||||
commandline.silent = wasSilent;
|
||||
|
||||
if (this.duringFeed != "")
|
||||
{
|
||||
//Create a scalar constant for closure.
|
||||
let duringFeed = this.duringFeed;
|
||||
this.duringFeed = "";
|
||||
|
||||
setTimeout(function () events.feedkeys(duringFeed, false, false, true), 0);
|
||||
}
|
||||
}
|
||||
return i == keys.length;
|
||||
},
|
||||
@@ -1385,9 +1395,9 @@ function Events() //{{{
|
||||
// we can differentiate between a recorded <C-c>
|
||||
// interrupting whatever it's started and a real <C-c>
|
||||
// interrupting our playback.
|
||||
if (events.feedingKeys)
|
||||
if (events.feedingKeys && !event.isMacro)
|
||||
{
|
||||
if (key == "<C-c>" && !event.isMacro)
|
||||
if (key == "<C-c>")
|
||||
{
|
||||
events.feedingKeys = false;
|
||||
if (modes.isReplaying)
|
||||
@@ -1399,6 +1409,13 @@ function Events() //{{{
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
events.duringFeed += key;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
let stop = true; // set to false if we should NOT consume this event but let Firefox handle it
|
||||
@@ -1681,13 +1698,16 @@ function Events() //{{{
|
||||
}
|
||||
},
|
||||
// for notifying the user about secure web pages
|
||||
onSecurityChange: function (webProgress, aRequest, aState)
|
||||
onSecurityChange: function (webProgress, request, state)
|
||||
{
|
||||
if (aState & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
||||
// TODO: do something useful with STATE_SECURE_MED and STATE_SECURE_LOW
|
||||
if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
||||
statusline.setClass("insecure");
|
||||
else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
||||
statusline.setClass("broken");
|
||||
else if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE)
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
|
||||
statusline.setClass("extended");
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
|
||||
statusline.setClass("secure");
|
||||
},
|
||||
onStatusChange: function (webProgress, request, status, message)
|
||||
|
||||
@@ -71,9 +71,10 @@ Highlights.prototype.CSS = <![CDATA[
|
||||
LineNr color: orange; background: white;
|
||||
Question color: green; background: white; font-weight: bold;
|
||||
|
||||
StatusLine color: white; background: black;
|
||||
StatusLineBroken color: black; background: #FF6060 /* light-red */
|
||||
StatusLineSecure color: black; background: #B0FF00 /* light-green */
|
||||
StatusLine color: white; background: black;
|
||||
StatusLineBroken color: black; background: #FFa0a0 /* light-red */
|
||||
StatusLineSecure color: black; background: #a0a0FF /* light-blue */
|
||||
StatusLineExtended color: black; background: #a0FFa0 /* light-green */
|
||||
|
||||
TabClose
|
||||
TabIcon
|
||||
|
||||
@@ -2018,16 +2018,18 @@ function StatusLine() //{{{
|
||||
|
||||
/**
|
||||
* Update the status bar to indicate how secure the website is:
|
||||
* extended - Secure connection with Extended Validation(EV) certificate.
|
||||
* secure - Secure connection with valid certificate.
|
||||
* broken - Secure connection with invalid certificate, or
|
||||
* mixed content.
|
||||
* insecure - Insecure connection.
|
||||
*
|
||||
* @param {'secure'|'broken'|'insecure'} type
|
||||
* @param {'extended'|'secure'|'broken'|'insecure'} type
|
||||
*/
|
||||
setClass: function setClass(type)
|
||||
{
|
||||
const highlightGroup = {
|
||||
extended: "StatusLineExtended",
|
||||
secure: "StatusLineSecure",
|
||||
broken: "StatusLineBroken",
|
||||
insecure: "StatusLine"
|
||||
|
||||
@@ -675,7 +675,7 @@ const util = { //{{{
|
||||
|
||||
// Ok, not a valid proto. If it looks like URL-ish (foo.com/bar),
|
||||
// let Gecko figure it out.
|
||||
if (/[.]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url))
|
||||
if (/[.\/]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url))
|
||||
return url;
|
||||
|
||||
// TODO: it would be clearer if the appropriate call to
|
||||
|
||||
Reference in New Issue
Block a user