1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-01 04:05:47 +01:00

Fix some errors in :command-complete-custom. Fix some help tags not appearing.

This commit is contained in:
Kris Maglione
2011-01-19 17:54:17 -05:00
parent 067b8d2a6c
commit a0ad529424
10 changed files with 61 additions and 40 deletions

View File

@@ -968,6 +968,19 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
}
},
onClick: function onClick(event) {
let command = event.originalTarget.getAttributeNS(NS, "command");
if (command && event.button == 0) {
event.preventDefault();
if (dactyl.commands[command])
dactyl.withSavedValues(["forceNewTab"], function () {
dactyl.forceNewTab = event.ctrlKey || event.shiftKey || event.button == 1;
dactyl.commands[command](event);
});
}
},
/**
* Opens one or more URLs. Returns true when load was initiated, or
* false on error.
@@ -1307,6 +1320,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
return items;
}
}, {
events: function () {
events.addSessionListener(window, "click", dactyl.closure.onClick, true);
},
// Only general options are added here, which are valid for all Dactyl extensions
options: function () {
options.add(["errorbells", "eb"],