// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2011 by Kris Maglione <maglione.k at Gmail>
+// Copyright (c) 2008-2012 Kris Maglione <maglione.k at Gmail>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
-/* use strict */
+"use strict";
/** @scope modules */
events: {
DOMContentLoaded: function onDOMContentLoaded(event) {
let doc = event.originalTarget;
- if (doc instanceof HTMLDocument)
+ if (doc instanceof Ci.nsIDOMHTMLDocument)
this._triggerLoadAutocmd("DOMLoad", doc);
},
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
setOverLink: util.wrapCallback(function setOverLink(link, b) {
setOverLink.superapply(this, arguments);
dactyl.triggerObserver("browser.overLink", link);
- }),
+ })
}
}, {
}, {
commands.add(["redr[aw]"],
"Redraw the screen",
function () {
- window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
- .redraw();
+ statusline.overLink = null;
statusline.updateStatus();
commandline.clear();
+ window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
+ .redraw();
},
{ argCount: "0" });
},
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)
mappings.add([modes.NORMAL], ["<open-homepage>", "gh"],
"Open homepage",
- function () { BrowserHome(); });
+ function () { window.BrowserHome(); });
mappings.add([modes.NORMAL], ["<tab-open-homepage>", "gH"],
"Open homepage in a new tab",
function () {
- let homepages = gHomeButton.getHomePage();
+ let homepages = window.gHomeButton.getHomePage();
dactyl.open(homepages, { from: "homepage", where: dactyl.NEW_TAB });
});
}
});
-// vim: set fdm=marker sw=4 ts=4 et:
+// vim: set fdm=marker sw=4 sts=4 ts=8 et: