diff --git a/common/bootstrap.js b/common/bootstrap.js index 7fb41e91..39bf9e73 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -143,15 +143,17 @@ function init() { }); if (manifestURI instanceof Ci.nsIFileURL) - manager.autoRegister(file.QueryInterface(Ci.nsIFileURL).file); + manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); else { var file = basePath.parent; file.append(addon.id + ".manifest"); writeFile(file, result.map(function (line) line.join(" ")).join("\n")); manager.autoRegister(file); - //file.remove(false); + file.remove(false); } + + require(global, "overlay"); } function reasonToString(reason) { diff --git a/common/content/dactyl-overlay.js b/common/content/dactyl-overlay.js deleted file mode 100644 index a0a51da6..00000000 --- a/common/content/dactyl-overlay.js +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2008-2010 Kris Maglione -// -// This work is licensed for reuse under an MIT license. Details are -// given in the LICENSE.txt file included with this file. -"use strict"; - -(function () { - function newContext(proto) { - let sandbox = Components.utils.Sandbox(window, { sandboxPrototype: proto || modules, wantXrays: false }); - // Hack: - sandbox.Object = jsmodules.Object; - sandbox.Math = jsmodules.Math; - sandbox.__proto__ = proto || modules; - return sandbox; - } - const jsmodules = {}; - const modules = { - __proto__: jsmodules, - get content() this.config.browser.contentWindow || window.content, - jsmodules: jsmodules, - newContext: newContext, - window: window - }; - modules.modules = modules; - - const BASE = "chrome://dactyl/content/"; - const loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] - .getService(Components.interfaces.mozIJSSubScriptLoader); - - modules.load = function load(script) { - for (let [i, base] in Iterator(prefix)) { - try { - loader.loadSubScript(base + script + ".js", modules, "UTF-8"); - return; - } - catch (e) { - if (typeof e !== "string") { - dump("dactyl: Trying: " + (base + script + ".js") + ": " + e + "\n" + e.stack + "\n"); - Components.utils.reportError(e); - } - } - } - try { - Components.utils.import("resource://dactyl/" + script + ".jsm", jsmodules); - } - catch (e) { - dump("dactyl: Loading script " + script + ": " + e.result + " " + e + "\n"); - dump(Error().stack + "\n"); - Components.utils.reportError(e); - } - }; - - let prefix = [BASE]; - - modules.load("util"); - modules.load("services"); - prefix.unshift("chrome://" + modules.services["dactyl:"].name + "/content/"); - - ["base", - "modules", - "prefs", - "storage", - "javascript", - "dactyl", - "modes", - "abbreviations", - "autocommands", - "buffer", - "commandline", - "commands", - "completion", - "configbase", - "config", - "editor", - "events", - "finder", - "highlight", - "hints", - "io", - "mappings", - "marks", - "options", - "statusline", - "styles", - "template" - ].forEach(modules.load); - - modules.Config.prototype.scripts.forEach(modules.load); -})(); - -// vim: set fdm=marker sw=4 ts=4 et: diff --git a/common/content/dactyl.xul b/common/content/dactyl.xul deleted file mode 100644 index 5d6d6b62..00000000 --- a/common/content/dactyl.xul +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -]> - - - -