1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 16:22:27 +01:00

Add liberator.modules namespace, load scripts via subscript loader, report better errors on :so with here docs, beep when clicking an input field in command line mode.

This commit is contained in:
Kris Maglione
2008-10-13 21:05:48 +00:00
parent b7e36f74ed
commit ff7c3c1210
27 changed files with 789 additions and 751 deletions

View File

@@ -0,0 +1,45 @@
(function () {
const modules = {};
const BASE = "chrome://liberator/content/";
modules.modules = modules;
var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader);
function load(script) {
try
{
dump("liberator: Loading script: " + script + "\n");
loader.loadSubScript(BASE + script, modules)
}
catch (e)
{
if (Components.utils.reportError)
Components.utils.reportError(e);
dump("liberator: Loading script " + script + ": " + e + "\n");
}
}
Components.utils.import("resource://liberator/storage.jsm", modules);
["liberator.js",
"config.js",
"buffer.js",
"commands.js",
"completion.js",
"editor.js",
"events.js",
"find.js",
"hints.js",
"io.js",
"mappings.js",
"modes.js",
"options.js",
"template.js",
"ui.js",
"util.js"].forEach(load);
modules.config.scripts.forEach(load);
})()