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

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-11-29 19:06:52 -08:00
parent 810eda169a
commit 0c4a25ca86
8 changed files with 60 additions and 18 deletions

View File

@@ -321,7 +321,7 @@ var CompletionContext = Class("CompletionContext", {
util.trapErrors("onUpdate", this);
},
get createRow() this._createRow || template.completionRow, // XXX
get createRow() this._createRow || template_.completionRow, // XXX
set createRow(createRow) this._createRow = createRow,
get filterFunc() this._filterFunc || util.identity,
@@ -494,7 +494,7 @@ var CompletionContext = Class("CompletionContext", {
this.processor = Array.slice(this.process);
if (!this.anchored)
this.processor[0] = function (item, text) self.process[0].call(self, item,
template.highlightFilter(item.text, self.filter, null, item.isURI));
template_.highlightFilter(item.text, self.filter, null, item.isURI));
try {
// Item prototypes
@@ -823,7 +823,7 @@ var CompletionContext = Class("CompletionContext", {
throw Error();
this.offset = 0;
this.process = [template.icon, function (item, k) k];
this.process = [template_.icon, function (item, k) k];
this.filters = [CompletionContext.Filter.text];
this.tabPressed = false;
this.title = ["Completions"];
@@ -937,7 +937,7 @@ var Completion = Module("completion", {
modules.commandline.commandOutput(
["div", { highlight: "Completions" },
template_.map(contexts, function (context)
[template.completionRow(context.title, "CompTitle"),
[template_.completionRow(context.title, "CompTitle"),
template_.map(context.items, function (item) context.createRow(item), null, 100)])]);
},
}),
@@ -1089,7 +1089,7 @@ var Completion = Module("completion", {
contains(item.title, tok)));
let re = RegExp(tokens.filter(util.identity).map(util.regexp.escape).join("|"), "g");
function highlight(item, text, i) process[i].call(this, item, template.highlightRegexp(text, re));
function highlight(item, text, i) process[i].call(this, item, template_.highlightRegexp(text, re));
let process = context.process;
context.process = [
function (item, text) highlight.call(this, item, item.text, 0),
@@ -1120,9 +1120,9 @@ var Completion = Module("completion", {
function (args) {
modules.commandline.commandOutput(
["div", { highlight: "Completions" },
template.completionRow(["Context", "Title"], "CompTitle"),
template_.completionRow(["Context", "Title"], "CompTitle"),
template_.map(completion.contextList || [],
function (item) template.completionRow(item, "CompItem"))]);
function (item) template_.completionRow(item, "CompItem"))]);
},
{
argCount: "*",