mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-12 00:25:46 +01:00
Better dactyl: charset handling. Fix some option completion issues.
This commit is contained in:
@@ -969,7 +969,7 @@ var Commands = Module("commands", {
|
||||
util.assert(!error, error);
|
||||
|
||||
// if we add the argument to an option after a space, it MUST not be empty
|
||||
if (sep != "=" && !quote && arg.length == 0)
|
||||
if (sep != "=" && !quote && arg.length == 0 && !complete)
|
||||
arg = null;
|
||||
|
||||
count++; // to compensate the "=" character
|
||||
|
||||
@@ -254,7 +254,7 @@ var Styles = Module("Styles", {
|
||||
services["dactyl:"].providers["style"] = function styleProvider(uri) {
|
||||
let id = /^\/(\d*)/.exec(uri.path)[1];
|
||||
if (set.has(styles.allSheets, id))
|
||||
return ["text/css", unescape(encodeURI(styles.allSheets[id].fullCSS))];
|
||||
return ["text/css", styles.allSheets[id].fullCSS];
|
||||
return null;
|
||||
};
|
||||
},
|
||||
|
||||
@@ -974,11 +974,11 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
.map(function (node) "//" + node).join(" | ");
|
||||
},
|
||||
|
||||
makeDTD: function makeDTD(obj) unescape(encodeURI(iter(obj)
|
||||
makeDTD: function makeDTD(obj) iter(obj)
|
||||
.map(function ([k, v]) ["<!ENTITY ", k, " '", String.replace(v == null ? "null" : v, /['%]/g,
|
||||
function (m) ({ "'": "'", "%": "%" })[m]),
|
||||
"'>"].join(""))
|
||||
.join("\n"))),
|
||||
.join("\n"),
|
||||
|
||||
map: deprecated("iter.map", function map(obj, fn, self) iter(obj).map(fn, self).toArray()),
|
||||
writeToClipboard: deprecated("dactyl.clipboardWrite", function writeToClipboard(str, verbose) util.dactyl.clipboardWrite(str, verbose)),
|
||||
|
||||
Reference in New Issue
Block a user