From df81bcb1f9d2fba3bbe8374f520c0ad0eee30ffe Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 27 Nov 2012 23:13:13 -0800 Subject: [PATCH] Death to E4X and stuff. --- common/content/autocommands.js | 47 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 2937c0f6..0a48ecd5 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -104,30 +104,29 @@ var AutoCommands = Module("autocommands", { } XML.prettyPrinting = XML.ignoreWhitespace = false; - commandline.commandOutput( - - - - - { - template.map(hives, function (hive) - - - + - + - template.map(cmds(hive), function ([event, items]) - + - template.map(items, function (item, i) - - - - - ) + - ) + - ) - } -
----- Auto Commands -----
{hive.name} - {hive.filter}
{i == 0 ? event : ""}{item.filter.toXML ? item.filter.toXML() : item.filter}{item.command}
); + let table = ( + ["table", {}, + ["tr", { highlight: "Title" }, + ["td", { colspan: "3" }, "----- Auto Commands -----"]], + hives.map(function (hive) [ + ["tr", {}, + ["td", { colspan: "3" }, + ["span", { highlight: "Title" }, hive.name], + " ", /* E4X-FIXME: Filter is formatted E4X. */ String(hive.filter)]], + ["tr", { style: "height: .5ex;" }], + iter(cmds(hive)).map(function ([event, items]) [ + ["tr", { style: "height: .5ex;" }], + items.map(function (item, i) + ["tr", {}, + ["td", { highlight: "Title", style: "padding-left: 1em; padding-right: 1em;" }, + i == 0 ? event : ""], + // E4X-FIXME: ["td", {}, item.filter.toXML ? item.filter.toXML() : String(item.filter)], + ["td", {}, String(item.filter)], + ["td", {}, String(item.command)]]), + ["tr", { style: "height: .5ex;" }]]).toArray(), + ["tr", { style: "height: .5ex;" }], + ])]); + commandline.commandOutput(table); }, /**