X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fcontent%2Fbrowser.js;h=73736298120117cba328afac2553641a8227d166;hb=247daf849abc85f4cfb10fa358c62c8daf8db95b;hp=a1b111094fd986cd1bb80763c2d9d862365fe984;hpb=8b6fcae7eaa413bc62d645d2d0c99835c47265e6;p=dactyl.git diff --git a/common/content/browser.js b/common/content/browser.js index a1b1110..7373629 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -1,6 +1,6 @@ // Copyright (c) 2006-2008 by Martin Stubenschrott // Copyright (c) 2007-2011 by Doug Kearns -// Copyright (c) 2008-2012 Kris Maglione +// Copyright (c) 2008-2014 Kris Maglione // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. @@ -16,11 +16,17 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), this.cleanupProgressListener = overlay.overlayObject(window.XULBrowserWindow, this.progressListener); util.addObserver(this); + + this._unoverlay = overlay.overlayObject(FullZoom, { + get siteSpecific() false, + set siteSpecific(val) {} + }); }, destroy: function () { this.cleanupProgressListener(); this.observe.unregister(); + this._unoverlay(); }, observers: { @@ -66,7 +72,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), events: { DOMContentLoaded: function onDOMContentLoaded(event) { let doc = event.originalTarget; - if (doc instanceof HTMLDocument) + if (doc instanceof Ci.nsIDOMHTMLDocument) this._triggerLoadAutocmd("DOMLoad", doc); }, @@ -78,7 +84,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), if (doc instanceof Document) dactyl.initDocument(doc); - if (doc instanceof HTMLDocument) { + if (doc instanceof Ci.nsIDOMHTMLDocument) { if (doc.defaultView.frameElement) { // document is part of a frameset @@ -193,8 +199,8 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), function (args) { dactyl.open(args[0] || "about:blank"); }, { completer: function (context) completion.url(context), - domains: function (args) array.compact(dactyl.parseURLs(args[0] || "").map( - function (url) util.getHost(url))), + domains: function (args) array.compact(dactyl.parseURLs(args[0] || "") + .map(url => util.getHost(url))), literal: 0, privateData: true }); @@ -222,7 +228,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), if (dactyl.forceTarget in openModes) mode = openModes[dactyl.forceTarget]; - CommandExMode().open(mode + "open " + (args || "")) + CommandExMode().open(mode + "open " + (args || "")); } function decode(uri) util.losslessDecodeURI(uri) @@ -282,4 +288,4 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), } }); -// vim: set fdm=marker sw=4 ts=4 et: +// vim: set fdm=marker sw=4 sts=4 ts=8 et: