mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:17:58 +01:00
Fixed :map partly, still cannot cope with :map commans, where lhs is a 2-char string
This commit is contained in:
@@ -462,7 +462,7 @@ function Commands() //{{{
|
|||||||
{
|
{
|
||||||
short_help: "Show progress of current downloads",
|
short_help: "Show progress of current downloads",
|
||||||
help: "Open the original Firefox download dialog in a new tab.<br/>" +
|
help: "Open the original Firefox download dialog in a new tab.<br/>" +
|
||||||
"Here, downloads can be paused, cancelled and resumed."
|
"Here, downloads can be paused, canceled and resumed."
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
addDefaultCommand(new Command(["ec[ho]"],
|
addDefaultCommand(new Command(["ec[ho]"],
|
||||||
@@ -598,9 +598,10 @@ function Commands() //{{{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var matches = args.match(/^([^ ]+)(?:\s+(.+))?$/);
|
var matches = args.match(/^([^\s]+)\s+(.+)$/);
|
||||||
var [lhs, rhs] = [matches[1], matches[2]];
|
var [lhs, rhs] = [matches[1], matches[2]];
|
||||||
|
|
||||||
|
// alert(">>" + lhs + "<<");
|
||||||
if (rhs)
|
if (rhs)
|
||||||
{
|
{
|
||||||
vimperator.mappings.add(new Map(vimperator.modes.NORMAL, [lhs],
|
vimperator.mappings.add(new Map(vimperator.modes.NORMAL, [lhs],
|
||||||
@@ -777,7 +778,7 @@ function Commands() //{{{
|
|||||||
"<ul><li><code class=\"command\">:open ...</code> with current location <code>\"http://www.example.com/dir1/dir2/file.html\"</code> will open <code>\"http://www.example.com\"</code></li>" +
|
"<ul><li><code class=\"command\">:open ...</code> with current location <code>\"http://www.example.com/dir1/dir2/file.html\"</code> will open <code>\"http://www.example.com\"</code></li>" +
|
||||||
"<li><code class=\"command\">:open ./foo.html</code> with current location <code>\"http://www.example.com/dir1/dir2/file.html\"</code> will open <code>\"http://www.example.com/dir1/dir2/foo.html\"</code></li></ul></li>" +
|
"<li><code class=\"command\">:open ./foo.html</code> with current location <code>\"http://www.example.com/dir1/dir2/file.html\"</code> will open <code>\"http://www.example.com/dir1/dir2/foo.html\"</code></li></ul></li>" +
|
||||||
"<li>Opened with the specified search engine if the token looks like a search string " +
|
"<li>Opened with the specified search engine if the token looks like a search string " +
|
||||||
"and the first word is the name of a search engine (<code class=\"command\">:open Wikipedia linus torvalds</code> " +
|
"and the first word is the name of a search engine (<code class=\"command\">:open wikipedia linus torvalds</code> " +
|
||||||
"will open the wikipedia entry for linus torvalds). The short name of a search engine is automatically guessed from its name. " +
|
"will open the wikipedia entry for linus torvalds). The short name of a search engine is automatically guessed from its name. " +
|
||||||
"If you want to set a custom name, open the $FIREFOX_PROFILE/searchplugins/*.xml file of the search engine, and add/change " +
|
"If you want to set a custom name, open the $FIREFOX_PROFILE/searchplugins/*.xml file of the search engine, and add/change " +
|
||||||
"<Alias>myalias</Alias> </li>" +
|
"<Alias>myalias</Alias> </li>" +
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ vimperator.help = function(section, easter) //{{{
|
|||||||
'For the best experience, I therefore recommend the <a href="https://addons.mozilla.org/firefox/364/">Whitehart</a> theme or any other flat theme.</p>\n' +
|
'For the best experience, I therefore recommend the <a href="https://addons.mozilla.org/firefox/364/">Whitehart</a> theme or any other flat theme.</p>\n' +
|
||||||
|
|
||||||
'<p>Vimperator was written by <a href="mailto:stubenschrott@gmx.net">Martin Stubenschrott</a>. ' +
|
'<p>Vimperator was written by <a href="mailto:stubenschrott@gmx.net">Martin Stubenschrott</a>. ' +
|
||||||
'If you appreciate my work on Vimperator and want to encourge me working on it more, you can either send me greetings, patches or make a donation: </p>\n' +
|
'If you appreciate my work on Vimperator and want to encourge me to work more on it, you can either send me greetings, patches or make a donation: </p>\n' +
|
||||||
|
|
||||||
'<form action="https://www.paypal.com/cgi-bin/webscr" method="post">\n<fieldset class="paypal">' +
|
'<form action="https://www.paypal.com/cgi-bin/webscr" method="post">\n<fieldset class="paypal">' +
|
||||||
'<input type="hidden" name="cmd" value="_s-xclick"/>' +
|
'<input type="hidden" name="cmd" value="_s-xclick"/>' +
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ const vimperator = (function() //{{{
|
|||||||
//},
|
//},
|
||||||
|
|
||||||
// ###VERSION### and ###DATE### are replaced by the Makefile
|
// ###VERSION### and ###DATE### are replaced by the Makefile
|
||||||
version: "###VERSION### CVS (created: ###DATE###)",
|
version: "###VERSION### (created: ###DATE###)",
|
||||||
|
|
||||||
input: {
|
input: {
|
||||||
buffer: "", // partial command storage
|
buffer: "", // partial command storage
|
||||||
|
|||||||
Reference in New Issue
Block a user