mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 15:37:59 +01:00
Clobber focusAndSelectUrlBar.
This commit is contained in:
@@ -40,9 +40,25 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
styles.registerSheet("resource://dactyl-skin/dactyl.css");
|
||||
|
||||
prefs.safeSet("accessibility.typeaheadfind.autostart", false);
|
||||
|
||||
this.cleanups = [];
|
||||
this.cleanups.push(util.overlayObject(window, {
|
||||
focusAndSelectUrlBar: function focusAndSelectUrlBar() {
|
||||
switch (options.get("strictfocus").getKey(document.documentURIObject || util.newURI(document.documentURI), "moderate")) {
|
||||
case "laissez-faire":
|
||||
if (!Events.isHidden(window.gURLBar, true))
|
||||
return focusAndSelectUrlBar.superapply(this, arguments);
|
||||
default:
|
||||
// Evil. Ignore.
|
||||
}
|
||||
}
|
||||
}));
|
||||
},
|
||||
|
||||
cleanup: function () {
|
||||
for (let cleanup in values(this.cleanups))
|
||||
cleanup.call(this);
|
||||
|
||||
delete window.dactyl;
|
||||
delete window.liberator;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user