1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 22:44:12 +01:00

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-12-17 18:56:36 -08:00
parent 0d179d78bc
commit 3f483de547
24 changed files with 112 additions and 517 deletions

View File

@@ -15,7 +15,7 @@ defineModule("util", {
lazyRequire("overlay", ["overlay"]);
lazyRequire("storage", ["File", "storage"]);
lazyRequire("template", ["template", "template_"]);
lazyRequire("template", ["template"]);
var Magic = Class("Magic", {
init: function init(str) {
@@ -987,8 +987,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
}
if (color) {
obj = template_.highlightFilter(util.clip(obj, 150), "\n",
function () ["span", { highlight: "NonText" }, "^J"]);
obj = template.highlightFilter(util.clip(obj, 150), "\n",
function () ["span", { highlight: "NonText" }, "^J"]);
var head = ["span", { highlight: "Title Object" }, obj, "::\n"];
}
else
@@ -1029,7 +1029,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
i = "";
if (color)
value = template_.highlight(value, true, 150, !color);
value = template.highlight(value, true, 150, !color);
else
value = util.clip(String(value).replace(/\n/g, "^J"), 150);
@@ -1053,7 +1053,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
return String.localeCompare(a[0], b[0]);
}
let vals = template_.map(keys.sort(compare), function (f) f[1], "\n");
let vals = template.map(keys.sort(compare), function (f) f[1], "\n");
if (color) {
return ["div", { style: "white-space: pre-wrap" }, head, vals];
}