mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-26 21:25:46 +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();
|
||||
|
||||
Reference in New Issue
Block a user