mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 10:17:58 +01:00
Add input:true to modes.MENU, just for the hell of it.
This commit is contained in:
@@ -139,6 +139,7 @@ var Modes = Module("modes", {
|
||||
});
|
||||
this.addMode("MENU", {
|
||||
extended: true,
|
||||
input: true,
|
||||
description: "Active when a menu or other pop-up is open",
|
||||
}); // a popupmenu is active
|
||||
this.addMode("LINE", {
|
||||
|
||||
@@ -71,7 +71,7 @@ var Services = Module("Services", {
|
||||
this.addClass("HtmlEncoder", "@mozilla.org/layout/htmlCopyEncoder;1", Ci.nsIDocumentEncoder);
|
||||
this.addClass("Persist", "@mozilla.org/embedding/browser/nsWebBrowserPersist;1", Ci.nsIWebBrowserPersist);
|
||||
this.addClass("Process", "@mozilla.org/process/util;1", Ci.nsIProcess, "init");
|
||||
this.addClass("String", "@mozilla.org/supports-string;1", Ci.nsISupportsString);
|
||||
this.addClass("String", "@mozilla.org/supports-string;1", Ci.nsISupportsString, "data");
|
||||
this.addClass("Timer", "@mozilla.org/timer;1", Ci.nsITimer, "initWithCallback");
|
||||
this.addClass("Xmlhttp", "@mozilla.org/xmlextras/xmlhttprequest;1", Ci.nsIXMLHttpRequest);
|
||||
this.addClass("ZipReader", "@mozilla.org/libjar/zip-reader;1", Ci.nsIZipReader, "open");
|
||||
@@ -163,7 +163,10 @@ var Services = Module("Services", {
|
||||
return res.wrappedJSObject;
|
||||
Array.concat(ifaces).forEach(function (iface) res.QueryInterface(iface));
|
||||
if (init && args.length)
|
||||
res[init].apply(res, args);
|
||||
if (callable(res[init]))
|
||||
res[init].apply(res, args);
|
||||
else
|
||||
res[init] = args[0];
|
||||
return res;
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
@@ -459,8 +459,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
else if (node instanceof Ci.nsIDOMRange)
|
||||
encoder.setRange(node);
|
||||
|
||||
let str = services.String();
|
||||
str.data = encoder.encodeToString();
|
||||
let str = services.String(encoder.encodeToString());
|
||||
if (html)
|
||||
return str.data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user