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

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-11-27 23:13:13 -08:00
parent a0f0668166
commit df81bcb1f9

View File

@@ -104,30 +104,29 @@ var AutoCommands = Module("autocommands", {
} }
XML.prettyPrinting = XML.ignoreWhitespace = false; XML.prettyPrinting = XML.ignoreWhitespace = false;
commandline.commandOutput( let table = (
<table> ["table", {},
<tr highlight="Title"> ["tr", { highlight: "Title" },
<td colspan="3">----- Auto Commands -----</td> ["td", { colspan: "3" }, "----- Auto Commands -----"]],
</tr> hives.map(function (hive) [
{ ["tr", {},
template.map(hives, function (hive) ["td", { colspan: "3" },
<tr> ["span", { highlight: "Title" }, hive.name],
<td colspan="3"><span highlight="Title">{hive.name}</span> " ", /* E4X-FIXME: Filter is formatted E4X. */ String(hive.filter)]],
{hive.filter}</td> ["tr", { style: "height: .5ex;" }],
</tr> + iter(cmds(hive)).map(function ([event, items]) [
<tr style="height: .5ex;"/> + ["tr", { style: "height: .5ex;" }],
template.map(cmds(hive), function ([event, items]) items.map(function (item, i)
<tr style="height: .5ex;"/> + ["tr", {},
template.map(items, function (item, i) ["td", { highlight: "Title", style: "padding-left: 1em; padding-right: 1em;" },
<tr> i == 0 ? event : ""],
<td highlight="Title" style="padding-left: 1em; padding-right: 1em;">{i == 0 ? event : ""}</td> // E4X-FIXME: ["td", {}, item.filter.toXML ? item.filter.toXML() : String(item.filter)],
<td>{item.filter.toXML ? item.filter.toXML() : item.filter}</td> ["td", {}, String(item.filter)],
<td>{item.command}</td> ["td", {}, String(item.command)]]),
</tr>) + ["tr", { style: "height: .5ex;" }]]).toArray(),
<tr style="height: .5ex;"/>) + ["tr", { style: "height: .5ex;" }],
<tr style="height: .5ex;"/>) ])]);
} commandline.commandOutput(table);
</table>);
}, },
/** /**