mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:58:00 +01:00
changed behavior of :bmarks! and :history! (thanks dpb)
This commit is contained in:
1
Donators
1
Donators
@@ -3,6 +3,7 @@
|
||||
|
||||
2008:
|
||||
* Kurtis Rader
|
||||
* Andrew Pantyukhin
|
||||
|
||||
2007:
|
||||
* Richard Terrell
|
||||
|
||||
2
NEWS
2
NEWS
@@ -7,6 +7,8 @@
|
||||
removed the following hint options: 'hintchars' 'maxhints'
|
||||
added the following hint options: 'hinttimeout'
|
||||
* IMPORTANT: changed 'I' key to Ctrl-Q to also work in textboxes
|
||||
* IMPORTANT: :bmarks! and :history! open the matching items now in a tab, instead
|
||||
of bringing up the bookmarks/history window
|
||||
* new :command to add user defined commands
|
||||
* new setCustomMode for plugin writers
|
||||
* :au[tocmd] executes commands on events (only 'PageLoad' actually) on websites
|
||||
|
||||
@@ -319,16 +319,10 @@ vimperator.Bookmarks = function () //{{{
|
||||
return url; // can be null
|
||||
},
|
||||
|
||||
list: function (filter, tags, fullmode)
|
||||
{
|
||||
if (fullmode)
|
||||
{
|
||||
vimperator.open("chrome://browser/content/bookmarks/bookmarksPanel.xul", vimperator.NEW_TAB);
|
||||
}
|
||||
else
|
||||
// if openItems is true, open the matching bookmarks items in tabs rather than display
|
||||
list: function (filter, tags, openItems)
|
||||
{
|
||||
var items = this.get(filter, tags, false);
|
||||
|
||||
if (items.length == 0)
|
||||
{
|
||||
if (filter.length > 0 || tags.length > 0)
|
||||
@@ -339,6 +333,18 @@ vimperator.Bookmarks = function () //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
if (openItems)
|
||||
{
|
||||
// FIXME: use yes/no question
|
||||
if (items.length > 50)
|
||||
return vimperator.echoerr("For now, you can only open a hard limit of 50 items at once");
|
||||
|
||||
for (var i = 0; i < items.length; i++)
|
||||
vimperator.open(items[i][0], vimperator.NEW_TAB);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var title, url, tags, keyword, extra;
|
||||
var list = ":" + vimperator.util.escapeHTML(vimperator.commandline.getCommand()) + "<br/>" +
|
||||
"<table><tr align=\"left\" class=\"hl-Title\"><th>title</th><th>URL</th></tr>";
|
||||
@@ -372,7 +378,6 @@ vimperator.Bookmarks = function () //{{{
|
||||
|
||||
vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
//}}}
|
||||
@@ -493,16 +498,10 @@ vimperator.History = function () //{{{
|
||||
getWebNavigation().gotoIndex(max);
|
||||
},
|
||||
|
||||
list: function (filter, fullmode)
|
||||
{
|
||||
if (fullmode)
|
||||
{
|
||||
vimperator.open("chrome://browser/content/history/history-panel.xul", vimperator.NEW_TAB);
|
||||
}
|
||||
else
|
||||
// if openItems is true, open the matching history items in tabs rather than display
|
||||
list: function (filter, openItems)
|
||||
{
|
||||
var items = this.get(filter);
|
||||
|
||||
if (items.length == 0)
|
||||
{
|
||||
if (filter.length > 0)
|
||||
@@ -513,6 +512,20 @@ vimperator.History = function () //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
if (openItems)
|
||||
{
|
||||
// FIXME: use yes/no question
|
||||
if (items.length > 50)
|
||||
return vimperator.echoerr("For now, you can only open a hard limit of 50 items at once");
|
||||
|
||||
for (var i = 0; i < items.length; i++)
|
||||
vimperator.open(items[i][0], vimperator.NEW_TAB);
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var list = ":" + vimperator.util.escapeHTML(vimperator.commandline.getCommand()) + "<br/>" +
|
||||
"<table><tr align=\"left\" class=\"hl-Title\"><th>title</th><th>URL</th></tr>";
|
||||
for (var i = 0; i < items.length; i++)
|
||||
|
||||
@@ -675,10 +675,10 @@ vimperator.Commands = function () //{{{
|
||||
vimperator.bookmarks.list(res.args.join(" "), tags, special);
|
||||
},
|
||||
{
|
||||
usage: ["bmarks [filter]", "bmarks!"],
|
||||
shortHelp: "Show bookmarks",
|
||||
usage: ["bmarks[!] [filter]"],
|
||||
shortHelp: "List or open multiple bookmarks",
|
||||
help: "Open the message window at the bottom of the screen with all bookmarks which match <code class=\"argument\">[filter]</code> either in the title or URL.<br/>" +
|
||||
"The special version <code class=\"command\">:bmarks!</code> opens the default Firefox bookmarks window.<br/>" +
|
||||
"The special version <code class=\"command\">:bmarks!</code> works the same as <code class=\"command\">:bmarks</code> except it opens all the found bookmarks in new tabs.<br/>" +
|
||||
"Filter can also contain the following options:<br/>" +
|
||||
"-tags=comma,separated,tag,list<br/>",
|
||||
completer: function (filter) { return [0, vimperator.bookmarks.get(filter)]; },
|
||||
@@ -1106,10 +1106,10 @@ vimperator.Commands = function () //{{{
|
||||
commandManager.add(new vimperator.Command(["hist[ory]", "hs"],
|
||||
function (args, special) { vimperator.history.list(args, special); },
|
||||
{
|
||||
usage: ["hist[ory] [filter]", "history!"],
|
||||
usage: ["hist[ory][!] [filter]"],
|
||||
shortHelp: "Show recently visited URLs",
|
||||
help: "Open the message window at the bottom of the screen with all history items which match <code class=\"argument\">[filter]</code> either in the title or URL.<br/>" +
|
||||
"The special version <code class=\"command\">:history!</code> opens the default Firefox history window.",
|
||||
"The special version <code class=\"command\">:history!</code> works the same as <code class=\"command\">:history</code> except it opens all the found items in new tabs.<br/>",
|
||||
completer: function (filter) { return [0, vimperator.history.get(filter)]; }
|
||||
}
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user