diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-06-17 18:18:34 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-06-17 18:18:34 -0400 |
commit | 94c9515422de9e9983a47799e3f18a57bb60b9ac (patch) | |
tree | 79369b43ef3bb44e6445116efb48d7c3812f9f40 /common/content | |
parent | 3c15e4d29025cd6caa62693e68ce8463388b715f (diff) | |
download | pentadactyl-94c9515422de9e9983a47799e3f18a57bb60b9ac.tar.gz |
Clobber focusAndSelectUrlBar.
Diffstat (limited to 'common/content')
-rw-r--r-- | common/content/dactyl.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 5fcf2edd..998fe994 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -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; |