1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 03:05:46 +01:00

Accept command line arguments in :rehash. Document :rehash, add :exttoggle, :extrehash.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-28 09:25:53 -05:00
parent 7b4e64f0bf
commit 83aa5e4857
6 changed files with 111 additions and 19 deletions

View File

@@ -36,7 +36,7 @@ var Services = Module("Services", {
this.add("extensionManager", "@mozilla.org/extensions/manager;1", Ci.nsIExtensionManager);
this.add("favicon", "@mozilla.org/browser/favicon-service;1", Ci.nsIFaviconService);
this.add("focus", "@mozilla.org/focus-manager;1", Ci.nsIFocusManager);
this.add("fuel", "@mozilla.org/fuel/application;1", Ci.fuelIApplication);
this.add("fuel", "@mozilla.org/fuel/application;1", Ci.extIApplication);
this.add("history", "@mozilla.org/browser/global-history;2", [Ci.nsIBrowserHistory, Ci.nsIGlobalHistory3,
Ci.nsINavHistoryService, Ci.nsPIPlacesDatabase]);
this.add("io", "@mozilla.org/network/io-service;1", Ci.nsIIOService);

View File

@@ -1187,7 +1187,9 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
getSource: function regexp_getSource(re) re.source.replace(/\\(.)/g, function (m0, m1) m1 === "/" ? "/" : m0)
}),
rehash: function () {
rehash: function (args) {
if (services.fuel)
services.fuel.storage.set("dactyl.commandlineArgs", args);
this.timeout(function () {
this.rehashing = true;
this.addon.userDisabled = true;
@@ -1443,6 +1445,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
*/
xmlToDom: function xmlToDom(node, doc, nodes) {
XML.prettyPrinting = false;
if (typeof node === "string") // Sandboxes can't currently pass us XML objects.
node = XML(node);
if (node.length() != 1) {
let domnode = doc.createDocumentFragment();
for each (let child in node)