mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 20:17:59 +01:00
Strip leading counts and trailing bangs from help tag links.
This commit is contained in:
@@ -1421,20 +1421,24 @@ window.liberator = liberator;
|
||||
// FIXME: Ugly, etc.
|
||||
window.addEventListener("liberatorHelpLink", function (event) {
|
||||
let elem = event.target;
|
||||
|
||||
if (/^(option|mapping|command)$/.test(elem.className))
|
||||
var tag = elem.textContent.replace(/\s.*/, "");
|
||||
if (/^(mapping|command)$/.test(elem.className))
|
||||
tag = tag.replace(/^\d+/, "");
|
||||
if (elem.className == "command")
|
||||
tag = tag.replace(/\[.*?\]/g, "");
|
||||
tag = tag.replace(/\[.*?\]/g, "").replace(/!$/, "");
|
||||
|
||||
if (tag)
|
||||
var page = liberator.findHelp(tag);
|
||||
|
||||
if (page)
|
||||
{
|
||||
elem.href = "chrome://liberator/locale/" + page;
|
||||
if (buffer.URL.replace(/#.*/, "") == elem.href.replace(/#.*/, "")) // XXX
|
||||
setTimeout(function () { content.postMessage("fragmentChange", "*"); }, 0);
|
||||
}
|
||||
},
|
||||
true, true);
|
||||
}, true, true);
|
||||
|
||||
// called when the chrome is fully loaded and before the main window is shown
|
||||
window.addEventListener("load", liberator.startup, false);
|
||||
|
||||
@@ -2,8 +2,8 @@ HEADER
|
||||
|
||||
|Command-line-mode| |Command-line| |mode-cmdline| +
|
||||
|
||||
Command-line mode is used to enter Ex commands (":") and text search patterns
|
||||
("/" and "?").
|
||||
Command-line mode is used to enter Ex commands ("[m]:[m]") and text search patterns
|
||||
("[m]/[m]" and "[m]?[m]").
|
||||
|
||||
|:| +
|
||||
||:||
|
||||
|
||||
@@ -100,7 +100,7 @@ section:Features[features]
|
||||
with support for Firefox keyword bookmarks and search engines
|
||||
* Count supported for many commands ([m]3<C-o>[m] will go back 3 pages)
|
||||
* Beep on errors
|
||||
* Marks support ([m]ma[m] to set mark a on a web page, [m]'a[m] to go there)
|
||||
* Marks support ([m]m[m][a]a[a] to set mark a on a web page, [m]'[m][a]a[a] to go there)
|
||||
* QuickMarks support (quickly go to previously marked web pages with [m]go[m][a]\\{a-zA-Z0-9\\}[a])
|
||||
* [c]:map[c] and [c]:command[c] support (and feedkeys() for script writers)
|
||||
* [c]:time[c] support for profiling
|
||||
|
||||
@@ -22,8 +22,8 @@ If you're a veteran Vim user, this may look familiar. It should.
|
||||
|
||||
However, in this author's opinion, the best way to get familiar with
|
||||
Vimperator is to leave these disabled for now. (The above action can be
|
||||
reversed with [c]:set go=<CR>[c]) You can look at the entry for
|
||||
[o]guioptions[o] in help:options[options.html] for more information on this.
|
||||
reversed with [c]:set go=<CR>[c]) You can look at the entry for 'guioptions' in
|
||||
help:options[options.html] for more information on this.
|
||||
|
||||
section:Vimperator's{nbsp}modal{nbsp}interface[modal]
|
||||
|
||||
@@ -36,8 +36,8 @@ When Vimperator starts, it is in Normal mode by default. This is probably where
|
||||
you will spend the majority of your time.
|
||||
|
||||
The other core mode of Vimperator, Command-line mode, can be entered from
|
||||
Normal mode by typing a \':' (colon). You will frequently see Vimperator
|
||||
commands start with a \':', indicating that what follows is a command.
|
||||
Normal mode by typing a \'[m]:[m]' (colon). You will frequently see Vimperator
|
||||
commands start with a \'[m]:[m]', indicating that what follows is a command.
|
||||
|
||||
To return to Normal mode from Command-line mode, type [m]<Esc>[m]. Pressing
|
||||
[m]<Esc>[m] will also return you to Normal mode from most other modes in
|
||||
@@ -142,7 +142,7 @@ type uniquely identifies any given link, Vimperator will follow that link
|
||||
immediately without any further user input.
|
||||
|
||||
Whichever way you choose to indicate your target link, once Vimperator has
|
||||
highlighted the link you want, simply hit <Enter> to open it.
|
||||
highlighted the link you want, simply hit [m]<Enter>[m] to open it.
|
||||
|
||||
The most common hint mode is called help:QuickHint{nbsp}mode[various.html,f].
|
||||
To activate QuickHint mode, press either [m]f[m] or [m]F[m]. The lower-case
|
||||
|
||||
Reference in New Issue
Block a user