diff --git a/common/bootstrap.js b/common/bootstrap.js index 1d2577a1..ef41fa29 100755 --- a/common/bootstrap.js +++ b/common/bootstrap.js @@ -123,16 +123,9 @@ function init() { for each (let line in manifest.split("\n")) { let fields = line.split(/\s+/); switch(fields[0]) { - case "content": - fields[2] = url(fields[2]); - default: - result.push(fields); - break; - - case "locale": - case "skin": - fields[3] = url(fields[3]); - result.push(fields); + case "#": + if (fields[1] == "Suffix:") + var suffix = fields[1]; break; case "category": @@ -146,10 +139,6 @@ function init() { break; case "resource": - let str = "dactyl-"; - if (fields[1].indexOf(str) == 0) - var suffix = fields[1].substr(str.length - 1); - resourceProto.setSubstitution(fields[1], getURI(fields[2])); } } @@ -174,17 +163,6 @@ function init() { let manifestText = result.map(function (line) line.join(" ")).join("\n"); - if (manifestURI instanceof Ci.nsIFileURL) - manager.autoRegister(manifestURI.QueryInterface(Ci.nsIFileURL).file); - else { - var file = basePath.parent; - file.append(addon.id + ".manifest"); - - writeFile(file, manifestText); - manager.autoRegister(file); - file.remove(false); - } - require(global, "overlay"); } diff --git a/common/components/protocols.js b/common/components/protocols.js index c0085282..80e7e984 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -22,7 +22,7 @@ var global = this; var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -var DNE = "chrome://dactyl/content/does/not/exist"; +var DNE = "resource://dactyl/content/does/not/exist"; Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -162,7 +162,7 @@ Dactyl.prototype = { let path = decodeURIComponent(uri.path.replace(/^\/|#.*/g, "")); switch(uri.host) { case "content": - return makeChannel(this.pages[path] || "chrome://dactyl/content/" + path, uri); + return makeChannel(this.pages[path] || "resource://dactyl-content/" + path, uri); case "help": return makeChannel(this.FILE_MAP[path], uri); case "help-overlay": @@ -174,9 +174,9 @@ Dactyl.prototype = { if (tag in this.HELP_TAGS) return redirect("dactyl://help/" + this.HELP_TAGS[tag] + "#" + tag, uri); case "locale": - return makeChannel("chrome://dactyl/locale/" + path, uri); + return makeChannel(["resource://dactyl-locale", config.locale, path].join("/"), uri); case "locale-local": - return makeChannel("chrome://" + config.name + "/locale/" + path, uri); + return makeChannel(["resource://dactyl-local-locale", config.locale, path].join("/"), uri); } } catch (e) {} @@ -303,7 +303,7 @@ AboutHandler.prototype = { newChannel: function (uri) { let channel = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService) - .newChannel("chrome://dactyl/content/about.xul", null, null); + .newChannel("resource://dactyl-content/about.xul", null, null); channel.originalURI = uri; return channel; }, diff --git a/common/content/commandline.js b/common/content/commandline.js index 0ec01707..42aee812 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -34,14 +34,14 @@ var CommandWidgets = Class("CommandWidgets", {