diff --git a/chrome.manifest b/chrome.manifest index ed4476f9..fe31c25b 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -1,7 +1,9 @@ # Firefox -content vimperator content/ -resource vimperator modules/ -locale vimperator en-US locale/en-US/ -skin vimperator classic/1.0 skin/ -overlay chrome://browser/content/browser.xul chrome://vimperator/content/vimperator.xul +content liberator content/ +resource liberator modules/ +locale liberator en-US locale/en-US/ +skin liberator classic/1.0 skin/ +override chrome://liberator/content/liberator.dtd chrome://liberator/content/vimperator.dtd +overlay chrome://browser/content/browser.xul chrome://liberator/content/liberator.xul +overlay chrome://browser/content/browser.xul chrome://liberator/content/vimperator.xul diff --git a/content/buffer.js b/content/buffer.js index 3ecee3f0..b6c7b263 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -42,8 +42,7 @@ liberator.Buffer = function () //{{{ ["Search", ".__liberator-search", "*"], ["Bell", "#liberator-visualbell"], ]; - let name = liberator.config.name.toLowerCase(); - const highlightDocs = "chrome://" + name + "/content/buffer.xhtml,chrome://browser/content/browser.xul"; + const highlightDocs = "chrome://liberator/content/buffer.xhtml,chrome://browser/content/browser.xul"; var highlight = liberator.storage.newMap("highlight", false); @@ -234,8 +233,8 @@ liberator.Buffer = function () //{{{ let fontSize = document.defaultView.getComputedStyle(document.getElementById(mainWindowID), null) .getPropertyValue("font-size"); - styles.registerSheet("chrome://" + name + "/skin/vimperator.css"); - let error = styles.addSheet("chrome://" + name + "/content/buffer.xhtml", + styles.registerSheet("chrome://liberator/skin/liberator.css"); + let error = styles.addSheet("chrome://liberator/content/buffer.xhtml", "body { font-size: " + fontSize + "; }", true); function setZoom(value, fullZoom) diff --git a/content/completion.js b/content/completion.js index bc7c17ca..15258dcf 100644 --- a/content/completion.js +++ b/content/completion.js @@ -876,12 +876,12 @@ liberator.Completion = function () //{{{ try { var xmlhttp = new XMLHttpRequest(); - xmlhttp.open("GET", "chrome://" + liberator.config.name.toLowerCase() + "/locale/" + files[i], false); + xmlhttp.open("GET", "chrome://liberator/locale/" + files[i], false); xmlhttp.send(null); } catch (e) { - liberator.log("Error opening chrome://" + liberator.config.name.toLowerCase() + "/locale/" + files[i], 1); + liberator.log("Error opening chrome://liberator/locale/" + files[i], 1); continue; } var doc = xmlhttp.responseXML; diff --git a/content/liberator.js b/content/liberator.js index 62fe1eda..060564ec 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -638,7 +638,7 @@ const liberator = (function () //{{{ // with (liberator) means, liberator is the default namespace "inside" eval eval: function (str) { - const fileName = "chrome://" + liberator.config.name.toLowerCase() + "/content/liberator.js"; + const fileName = "chrome://liberator/content/liberator.js"; const line = new Error().lineNumber + 3; try { @@ -840,7 +840,7 @@ const liberator = (function () //{{{ var helpFile = liberator.options["helpfile"]; if (liberator.config.helpFiles.indexOf(helpFile) != -1) - liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/" + helpFile, where); + liberator.open("chrome://liberator/locale/" + helpFile, where); else liberator.echo("Sorry, help file \"" + helpFile + "\" not found"); @@ -849,7 +849,7 @@ const liberator = (function () //{{{ function jumpToTag(file, tag) { - liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/" + file, where); + liberator.open("chrome://liberator/locale/" + file, where); // TODO: it would be better wo wait for pageLoad setTimeout(function () { var elem = liberator.buffer.getElement('@class="tag" and text()="' + tag + '"'); @@ -1053,7 +1053,7 @@ const liberator = (function () //{{{ liberator.log("Initializing liberator object...", 0); // components which should be shared across all windows - Components.utils.import("resource://" + liberator.config.name.toLowerCase() + "/storage.jsm", liberator); + Components.utils.import("resource://liberator/storage.jsm", liberator); // commands must always be the first module to be initialized loadModule("commands", liberator.Commands); addCommands(); diff --git a/content/liberator.xul b/content/liberator.xul index ca3a6bd1..f2662221 100644 --- a/content/liberator.xul +++ b/content/liberator.xul @@ -28,7 +28,8 @@ the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. }}} ***** END LICENSE BLOCK ***** --> - + + +