diff --git a/common/content/buffer.js b/common/content/buffer.js index 3d64c1ed..a3e460bf 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -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; } diff --git a/common/content/events.js b/common/content/events.js index e08731f9..8d27087e 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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 // interrupting whatever it's started and a real // interrupting our playback. - if (events.feedingKeys) + if (events.feedingKeys && !event.isMacro) { - if (key == "" && !event.isMacro) + if (key == "") { 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) diff --git a/common/content/style.js b/common/content/style.js index d994dbd6..24a05657 100644 --- a/common/content/style.js +++ b/common/content/style.js @@ -71,9 +71,10 @@ Highlights.prototype.CSS = | |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). +________________________________________________________________________________ + + || + ||[count]|| ________________________________________________________________________________ @@ -141,16 +151,6 @@ first set to this value. ________________________________________________________________________________ -|| |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). -________________________________________________________________________________ - - || || || + ||[count]|| ________________________________________________________________________________ @@ -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 diff --git a/vimperator/locale/en-US/eval.txt b/vimperator/locale/en-US/eval.txt index 17c71dda..bbc0d5ba 100644 --- a/vimperator/locale/en-US/eval.txt +++ b/vimperator/locale/en-US/eval.txt @@ -70,7 +70,7 @@ ________________________________________________________________________________ ________________________________________________________________________________ Sets or lists a variable. Sets the variable {var-name} to the value of the expression {expr1}. If no expression is given, the value of the variable is -displayed.Without arguments, displays a list of all variables. +displayed. Without arguments, displays a list of all variables. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/gui.txt b/vimperator/locale/en-US/gui.txt index 4da826c5..bec1f78b 100644 --- a/vimperator/locale/en-US/gui.txt +++ b/vimperator/locale/en-US/gui.txt @@ -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 diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index 5a6a2fbb..085792e3 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -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 + diff --git a/vimperator/locale/en-US/map.txt b/vimperator/locale/en-US/map.txt index 6dce047a..b1073ffe 100644 --- a/vimperator/locale/en-US/map.txt +++ b/vimperator/locale/en-US/map.txt @@ -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 diff --git a/vimperator/locale/en-US/marks.txt b/vimperator/locale/en-US/marks.txt index 837268be..7a6e1239 100644 --- a/vimperator/locale/en-US/marks.txt +++ b/vimperator/locale/en-US/marks.txt @@ -80,7 +80,7 @@ section:History[history] ||[count]|| ________________________________________________________________________________ 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]|| ________________________________________________________________________________ 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. ________________________________________________________________________________ diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index bf042502..c434cb79 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -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 diff --git a/vimperator/locale/en-US/repeat.txt b/vimperator/locale/en-US/repeat.txt index 975cbea7..8d1adb3a 100644 --- a/vimperator/locale/en-US/repeat.txt +++ b/vimperator/locale/en-US/repeat.txt @@ -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. diff --git a/vimperator/locale/en-US/styling.txt b/vimperator/locale/en-US/styling.txt index 62138ea9..addb7208 100644 --- a/vimperator/locale/en-US/styling.txt +++ b/vimperator/locale/en-US/styling.txt @@ -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 diff --git a/vimperator/locale/en-US/tutorial.txt b/vimperator/locale/en-US/tutorial.txt index 21b5e285..f85af34f 100644 --- a/vimperator/locale/en-US/tutorial.txt +++ b/vimperator/locale/en-US/tutorial.txt @@ -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[c] + \{nbsp}[c]:help gT[c] diff --git a/vimperator/locale/en-US/various.txt b/vimperator/locale/en-US/various.txt index 79d485dc..7110495f 100644 --- a/vimperator/locale/en-US/various.txt +++ b/vimperator/locale/en-US/various.txt @@ -11,9 +11,9 @@ ________________________________________________________________________________ || |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| +