mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:38:00 +01:00
Add <bookmark> param for the JS bookmark object to Bookmark* autocommands.
This commit is contained in:
@@ -13,7 +13,12 @@ const Bookmarks = Module("bookmarks", {
|
||||
init: function () {
|
||||
storage.addObserver("bookmark-cache", function (key, event, arg) {
|
||||
if (["add", "change", "remove"].indexOf(event) >= 0)
|
||||
autocommands.trigger("Bookmark" + event[0].toUpperCase() + event.substr(1), arg);
|
||||
autocommands.trigger("Bookmark" + event[0].toUpperCase() + event.substr(1), iterAll({
|
||||
bookmark: {
|
||||
toString: function () "bookmarkcache.bookmarks[" + arg.id + "]",
|
||||
valueOf: function () arg
|
||||
}
|
||||
}, arg));
|
||||
statusline.updateUrl();
|
||||
}, window);
|
||||
},
|
||||
|
||||
@@ -314,7 +314,7 @@ const Command = Class("Command", {
|
||||
replacementText: null
|
||||
}, {
|
||||
bindMacro: function (args, default_, params) {
|
||||
let process = String;
|
||||
let process = util.identity;
|
||||
let makeParams = function makeParams()
|
||||
let (args = arguments)
|
||||
params.map(function (name, i) [name, process(args[i])]).toObject();
|
||||
|
||||
@@ -27,18 +27,19 @@
|
||||
</dl>
|
||||
|
||||
<dl tag="autocommand-args" replace="autocommand-args">
|
||||
<dt><url></dt> <dd>The URL against which the event was selected.</dd>
|
||||
<dt><title></dt> <dd>The page, bookmark or download title.</dd>
|
||||
<dt><doc></dt> <dd>The document for which the event occurred. Only for <em>DOMLoad</em>, <em>PageLoad</em> and <em>PageLoadPre</em>.</dd>
|
||||
<dt><tab></dt> <dd>The tab in which the event occurred. Only for <em>DOMLoad</em>, <em>PageLoad</em> and <em>PageLoadPre</em>.</dd>
|
||||
<dt><bookmark></dt> <dd>The JavaScript bookmark object. Only for <em>Bookmark*</em>.</dd>
|
||||
<dt><changed></dt> <dd>The name of the property that has changed. Only for <em>BookmarkChange</em>.</dd>
|
||||
<dt><tags></dt> <dd>The tags applied to <em><url></em>. Only for <em>Bookmark*</em>.</dd>
|
||||
<dt><keyword></dt> <dd>The keywords applied to the bookmark. Only for <em>BookmarkChange</em>, <em>BookmarkRemove</em>.</dd>
|
||||
<dt><icon></dt> <dd>The icon associated with <em><url></em>. Only for <em>Bookmark*</em>.</dd>
|
||||
<dt><size></dt> <dd>The size of a downloaded file. Only for <em>DownloadPost</em>.</dd>
|
||||
<dt><doc></dt> <dd>The document for which the event occurred. Only for <em>DOMLoad</em>, <em>PageLoad</em> and <em>PageLoadPre</em>.</dd>
|
||||
<dt><file></dt> <dd>The target destination of a download. Only for <em>DownloadPost</em>.</dd>
|
||||
<dt><state></dt> <dd>The new state. Only for <em>Fullscreen</em> and <em>PrivateMode</em>.</dd>
|
||||
<dt><icon></dt> <dd>The icon associated with <em><url></em>. Only for <em>Bookmark*</em>.</dd>
|
||||
<dt><keyword></dt> <dd>The keywords applied to the bookmark. Only for <em>BookmarkChange</em>, <em>BookmarkRemove</em>.</dd>
|
||||
<dt><name></dt> <dd>The name of the item. Only for <em>ColorScheme</em> and <em>Sanitize</em>.</dd>
|
||||
<dt><size></dt> <dd>The size of a downloaded file. Only for <em>DownloadPost</em>.</dd>
|
||||
<dt><state></dt> <dd>The new state. Only for <em>Fullscreen</em> and <em>PrivateMode</em>.</dd>
|
||||
<dt><tab></dt> <dd>The tab in which the event occurred. Only for <em>DOMLoad</em>, <em>PageLoad</em> and <em>PageLoadPre</em>.</dd>
|
||||
<dt><tags></dt> <dd>The tags applied to <em><url></em>. Only for <em>Bookmark*</em>.</dd>
|
||||
<dt><title></dt> <dd>The page, bookmark or download title.</dd>
|
||||
<dt><url></dt> <dd>The URL against which the event was selected.</dd>
|
||||
</dl>
|
||||
|
||||
</overlay>
|
||||
|
||||
Reference in New Issue
Block a user