mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 15:37:59 +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)
|
||||
|
||||
@@ -72,8 +72,9 @@ Highlights.prototype.CSS = <![CDATA[
|
||||
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 */
|
||||
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
|
||||
|
||||
@@ -19,7 +19,7 @@ Inactive/former developers:
|
||||
|
||||
Patches (in no special order):
|
||||
* Ruud Grosmann ('followhints' option)
|
||||
* Xie&Tian (multibyte support for hints)
|
||||
* Xie&Tian (multibyte support for hints, doc fixes)
|
||||
* Juergen Descher
|
||||
* Kazuo (count support for ctrl-^)
|
||||
* Daniel Schaffrath (;b support)
|
||||
|
||||
@@ -51,7 +51,7 @@ Each token is analyzed and in this order:
|
||||
to set a custom name, you can change it with [c]:dialog searchengines[c].
|
||||
3. Opened with the default search engine or keyword (specified with the
|
||||
'defsearch' option) if the first word is no search engine ([c]:open linus
|
||||
torvalds[c] opens a Google search for linux torvalds).
|
||||
torvalds[c] opens a Google search for linus torvalds).
|
||||
4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com,
|
||||
www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new
|
||||
background tab).
|
||||
|
||||
@@ -123,6 +123,16 @@ set).
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|<Right>| |l| +
|
||||
||[count]l||
|
||||
________________________________________________________________________________
|
||||
Scroll document to the right. If [count] is specified then move [count] times
|
||||
as much to the right. +
|
||||
If the document cannot scroll more, a beep is emitted (unless 'visualbell' is
|
||||
set).
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|<C-d>| +
|
||||
||[count]<C-d>||
|
||||
________________________________________________________________________________
|
||||
@@ -141,16 +151,6 @@ first set to this value.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|<Right>| |l| +
|
||||
||[count]l||
|
||||
________________________________________________________________________________
|
||||
Scroll document to the right. If [count] is specified then move [count] times
|
||||
as much to the right. +
|
||||
If the document cannot scroll more, a beep is emitted (unless 'visualbell' is
|
||||
set).
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|<S-Space>| |<PageUp>| |<C-b>| +
|
||||
||[count]<C-b>||
|
||||
________________________________________________________________________________
|
||||
@@ -235,7 +235,7 @@ default zoom levels are 30%, 50%, 67%, 80%, 90%, 100%, 110%, 120%, 133%, 150%,
|
||||
|
||||
The available zoom range can be changed by setting the
|
||||
\'http://kb.mozillazine.org/Zoom.minPercent[zoom.minPercent]' and
|
||||
\'http://kb.mozillazine.org/Zoom.minPercent[zoom.maxPercent]' Firefox
|
||||
\'http://kb.mozillazine.org/Zoom.maxPercent[zoom.maxPercent]' Firefox
|
||||
preferences. The zoom levels can be changed using the
|
||||
\'http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues[toolkit.ZoomManager.zoomLevels]'
|
||||
preference.
|
||||
@@ -274,7 +274,7 @@ ________________________________________________________________________________
|
||||
|zz| +
|
||||
||[count]zz||
|
||||
________________________________________________________________________________
|
||||
Set text zoom value of current web page. Zoom value can be between 30 and 300%.
|
||||
Set text zoom value of current web page. Zoom value can be between 30% and 300%.
|
||||
If it is omitted, text zoom is reset to 100%.
|
||||
________________________________________________________________________________
|
||||
|
||||
@@ -320,7 +320,7 @@ ________________________________________________________________________________
|
||||
||:zo[om][!] +{value} | -{value}|| +
|
||||
________________________________________________________________________________
|
||||
Set zoom value of current web page. [a][value][a] can be an absolute value
|
||||
between 30 and 300% or a relative value if prefixed with "-" or "+". If
|
||||
between 30% and 300% or a relative value if prefixed with "-" or "+". If
|
||||
[a][value][a] is omitted, zoom is reset to 100%.
|
||||
|
||||
Normally this command operates on the text zoom, if used with [!] it operates
|
||||
|
||||
@@ -20,7 +20,7 @@ ________________________________________________________________________________
|
||||
|:addo| |:addons| +
|
||||
||:addo[ns]||
|
||||
________________________________________________________________________________
|
||||
Show available Browser Extensions and Themes.
|
||||
Show available browser Extensions and Themes.
|
||||
You can add/remove/disable browser extensions from this dialog.
|
||||
Be aware that not all Firefox extensions work, because Vimperator overrides
|
||||
some key bindings and changes Firefox's GUI.
|
||||
@@ -34,7 +34,7 @@ Open a Firefox dialog.
|
||||
|
||||
Available dialogs:
|
||||
`------------------`-----------------------------------
|
||||
*about* About Firefox
|
||||
*about* About Mozilla Firefox
|
||||
*addbookmark* Add bookmark for the current page
|
||||
*addons* Manage Add-ons
|
||||
*bookmarks* List your bookmarks
|
||||
|
||||
@@ -170,7 +170,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
|
||||
||[c]:delmarks[c]|| Delete the specified marks +
|
||||
||[c]:delqmarks[c]|| Delete the specified QuickMarks +
|
||||
||[c]:delstyle[c]|| Delete any matching styles +
|
||||
||[c]:dialog[c]|| Open a undefined dialog +
|
||||
||[c]:dialog[c]|| Open a Firefox dialog +
|
||||
||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers +
|
||||
||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer +
|
||||
||[c]:downloads[c]|| Show progress of current downloads +
|
||||
@@ -217,11 +217,11 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
|
||||
||[c]:qmark[c]|| Mark a URL with a letter for quick access +
|
||||
||[c]:qmarks[c]|| Show all QuickMarks +
|
||||
||[c]:quit[c]|| Quit current tab +
|
||||
||[c]:quitall[c]|| Quit undefined +
|
||||
||[c]:quitall[c]|| Quit Vimperator +
|
||||
||[c]:redraw[c]|| Redraw the screen +
|
||||
||[c]:reload[c]|| Reload current page +
|
||||
||[c]:reloadall[c]|| Reload all tab pages +
|
||||
||[c]:restart[c]|| Force undefined to restart +
|
||||
||[c]:restart[c]|| Force the browser to restart +
|
||||
||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' +
|
||||
||[c]:saveas[c]|| Save current document to disk +
|
||||
||[c]:sbclose[c]|| Close the sidebar window +
|
||||
@@ -261,7 +261,7 @@ section:Options[option-index]
|
||||
|
||||
||'activate'|| Define when tabs are automatically activated +
|
||||
||'cdpath'|| List of directories searched when executing [c]:cd[c] +
|
||||
||'complete'|| Items which are completed at the [c]:[tab]open prompt[c] +
|
||||
||'complete'|| Items which are completed at the [c]:[tab]open[c] prompt +
|
||||
||'defsearch'|| Set the default search engine +
|
||||
||'editor'|| Set the external text editor +
|
||||
||'errorbells'|| Ring the bell when an error message is displayed +
|
||||
|
||||
@@ -346,7 +346,7 @@ Custom completion
|
||||
Custom completion can be provided by specifying the "custom,{func}" argument to
|
||||
-complete. The {func} is called with two arguments, a completion context, and
|
||||
an object describing the command's arguments. It should set the context's
|
||||
\'completions' property, or return an object, with \'start' and \'items'
|
||||
\'completions' property, or return an object, with \'items' and \'start'
|
||||
properties, describing the completions and where the replacement is to start.
|
||||
|
||||
*start* is the index into the word being completed at which the returned values
|
||||
|
||||
@@ -80,7 +80,7 @@ section:History[history]
|
||||
||[count]<C-o>||
|
||||
________________________________________________________________________________
|
||||
Go to an older position in the jump list. The jump list is just the browser
|
||||
history for now.
|
||||
history for now. If [count] is specified go back [count] pages.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ ________________________________________________________________________________
|
||||
||[count]<C-i>||
|
||||
________________________________________________________________________________
|
||||
Go to a newer position in the jump list. The jump list is just the browser
|
||||
history for now.
|
||||
history for now. If [count] is specified go forward [count] pages.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ Sets the default search engine. The default search engine name is used in the
|
||||
[c]:[tab]open [arg][c] command if [a][arg][a] neither looks like a URL or like
|
||||
a specified search engine/keyword.
|
||||
|
||||
This means, it you set 'defsearch' to "youtube", then [c]:open arnold
|
||||
This means, if you set 'defsearch' to "youtube", then [c]:open arnold
|
||||
schwarzenegger[c] will be exactly the same as [c]:open youtube arnold
|
||||
schwarzenegger[c]. Therefore, you need to add a keyword or search engine
|
||||
"youtube" first.
|
||||
@@ -472,7 +472,7 @@ ____
|
||||
|
||||
|
||||
|\'nolpl'| |\'lpl'| |\'noloadplugins'| |\'loadplugins'|
|
||||
||'loadplugins' 'lpl'|| boolean (default on)
|
||||
||'loadplugins' 'lpl'|| boolean (default: on)
|
||||
____
|
||||
Load plugin scripts when starting up. When on, yet unloaded plugins are
|
||||
automatically loaded after the vimperatorrc file has been sourced. To
|
||||
@@ -527,7 +527,7 @@ ____
|
||||
|
||||
|
||||
|\'noonline'| |\'online'|
|
||||
||'online'|| boolean (default on)
|
||||
||'online'|| boolean (default: on)
|
||||
____
|
||||
Show and set the \'work offline' behavior.
|
||||
____
|
||||
@@ -571,7 +571,7 @@ ____
|
||||
|\'nopreload'| |\'preload'|
|
||||
||'preload' 'nopreload'|| boolean (default: on)
|
||||
____
|
||||
Speed up first time history/bookmark completion
|
||||
Speed up first time history/bookmark completion.
|
||||
|
||||
History access can be quite slow for a large history.
|
||||
Vimperator maintains a cache to speed it up significantly on subsequent access.
|
||||
@@ -751,7 +751,7 @@ ____
|
||||
|\'wildcase'| |\'wic'|
|
||||
||'wildcase' 'wic'|| string (default: "smart")
|
||||
____
|
||||
Defines how completions are matched with regard to character case.
|
||||
Defines how completions are matched with regard to character case. Possible values:
|
||||
|
||||
`---------------`------------------------
|
||||
"smart" Case is significant when capital letters are typed
|
||||
|
||||
@@ -132,7 +132,7 @@ section:Profiling[profile,profiling]
|
||||
|:time|
|
||||
||:[count]time[!] {code|:command}|| +
|
||||
________________________________________________________________________________
|
||||
Profile a piece of code or a command. Run {code} [count] times (default 1)
|
||||
Profile a piece of code or a command. Run {code} [count] times (default: 1)
|
||||
and returns the elapsed time. {code} is always passed to JavaScript's eval(),
|
||||
which might be slow, so take the results with a grain of salt.
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ Valid groups are:
|
||||
*StatusLine* The status bar
|
||||
*StatusLineBroken* The status bar for a broken web page
|
||||
*StatusLineSecure* The status bar for a secure web page
|
||||
*StatusLineExtended* The status bar for a secure web page with an Extended Validation(EV) certificate
|
||||
*String* A JavaScript String object
|
||||
*TabClose* The close button of a browser tab
|
||||
*TabIcon* The icon of a browser tab
|
||||
|
||||
@@ -57,7 +57,7 @@ Similarly, help on configurable options is available with [c]:help
|
||||
'{option_name}'[c]. (Note the single quotes around the option name as in Vim.)
|
||||
Information on all available options is, predictably, [c]:help options[c].
|
||||
|
||||
and you can find out about the [m]gt[m] and [m]gT[m] mapping with
|
||||
And you can find out about the [m]gt[m] and [m]gT[m] mapping with
|
||||
|
||||
\{nbsp}[c]:help gt<CR>[c] +
|
||||
\{nbsp}[c]:help gT<CR>[c]
|
||||
|
||||
@@ -11,9 +11,9 @@ ________________________________________________________________________________
|
||||
|
||||
|<C-l>| |CTRL-L| |:redr| |:redraw| +
|
||||
||:redr[aw]||
|
||||
____
|
||||
________________________________________________________________________________
|
||||
Redraws the screen. Useful to update the screen halfway executing a script or function.
|
||||
____
|
||||
________________________________________________________________________________
|
||||
|
||||
|:norm| |:normal|
|
||||
||:norm[al][!] {commands}|| +
|
||||
@@ -54,7 +54,7 @@ ________________________________________________________________________________
|
||||
Open help window. The default page, as specified by 'helpfile' is shown unless
|
||||
[a][subject][a] is specified. If you need help for a specific topic, try
|
||||
[c]:help overview[c].
|
||||
____________________________________________________________________________
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|:exu| |:exusage| +
|
||||
|
||||
Reference in New Issue
Block a user