1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 09:44:13 +01:00

- Fixed gn command

- added gH to activate option
This commit is contained in:
Martin Stubenschrott
2007-08-09 22:41:53 +00:00
parent d024134fbe
commit c9229435c3
4 changed files with 15 additions and 7 deletions

View File

@@ -358,10 +358,16 @@ function Mappings() //{{{
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["gH"],
function() { vimperator.open("", vimperator.NEW_TAB); BrowserHome(); },
function()
{
var homepages = gHomeButton.getHomePage();
vimperator.open(homepages, /\bhomepage\b/.test(vimperator.options["activate"]) ?
vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB);
},
{
short_help: "Go home in a new tab",
help: "Opens the homepage in a new tab."
help: "Opens the homepage in a new tab. " +
"Whether the new tab is activated or not depends on the <code class=\"option\">'activate'</code> option.<br/>"
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["go"],
@@ -377,7 +383,7 @@ function Mappings() //{{{
addDefaultMap(new Map(vimperator.modes.NORMAL, ["gn"],
function(arg)
{
vimperator.quickmarks.jumpTo(mark,
vimperator.quickmarks.jumpTo(arg,
/\bquickmark\b/.test(vimperator.options["activate"]) ?
vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB);
},

View File

@@ -302,16 +302,17 @@ function Options() //{{{
"//xhtml:*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " +
"//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | //xhtml:button | //xhtml:select"
addOption(new Option(["activate"], "stringlist",
addOption(new Option(["activate", "act"], "stringlist",
{
short_help: "Define when tabs are automatically activated",
help: "Available items:<br/>" +
"<ul>" +
"<li><b>homepage</b>: <code class=\"mapping\">gH</code> mapping</li>" +
"<li><b>quickmark</b>: <code class=\"mapping\">go</code> and <code class=\"mapping\">gn</code> mappings</li>" +
"<li><b>tabopen</b>: <code class=\"command\">:tabopen[!]</code> command</li>" +
"<li><b>paste</b>: <code class=\"mapping\">P</code> and <code class=\"mapping\">gP</code> mappings</li>" +
"</ul>",
default_value: "quickmark,tabopen,paste"
default_value: "homepage,quickmark,tabopen,paste"
}
));
addOption(new Option(["beep"], "boolean",