diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 0a48ecd5..040a8ba3 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; /** @scope modules */ diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index b3b0869c..8c60020e 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; // also includes methods for dealing with keywords and search engines var Bookmarks = Module("bookmarks", { diff --git a/common/content/browser.js b/common/content/browser.js index cc504ff1..a4eb1983 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; /** @scope modules */ diff --git a/common/content/help.js b/common/content/help.js index 0bde1ee4..9faf7a2a 100644 --- a/common/content/help.js +++ b/common/content/help.js @@ -2,7 +2,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; function checkFragment() { document.title = document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "title")[0].textContent; diff --git a/common/content/hints.js b/common/content/hints.js index 9c39b094..b35b0996 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; /** @scope modules */ /** @instance hints */ @@ -312,11 +312,11 @@ var HintSession = Class("HintSession", CommandMode, { let body = doc.body || doc.querySelector("body"); if (body) { - let fragment = DOM(
, doc).appendTo(body); + let fragment = DOM(["div", { highlight: "hints" }], doc).appendTo(body); fragment.style.height; // Force application of binding. let container = doc.getAnonymousElementByAttribute(fragment[0], "anonid", "hints") || fragment[0]; - let baseNode = DOM(, doc)[0]; + let baseNode = DOM(["span", { highlight: "Hint", style: "display: none;" }], doc)[0]; let mode = this.hintMode; let res = mode.matcher(doc); @@ -593,7 +593,7 @@ var HintSession = Class("HintSession", CommandMode, { if (!rect) continue; - hint.imgSpan = DOM(, doc).css({ + hint.imgSpan = DOM(["span", { highlight: "Hint", "dactyl:hl": "HintImage" }], doc).css({ display: "none", left: (rect.left + offsetX) + "px", top: (rect.top + offsetY) + "px", diff --git a/common/content/history.js b/common/content/history.js index fa6bf848..bf2534d1 100644 --- a/common/content/history.js +++ b/common/content/history.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; var History = Module("history", { SORT_DEFAULT: "-date", diff --git a/common/content/key-processors.js b/common/content/key-processors.js index e1ba321f..63b27938 100644 --- a/common/content/key-processors.js +++ b/common/content/key-processors.js @@ -2,7 +2,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; /** @scope modules */ diff --git a/common/content/mappings.js b/common/content/mappings.js index d39b0ee9..8f7b298b 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -480,34 +480,30 @@ var Mappings = Module("mappings", { return maps; } - let list = - - - - - - - { - template.map(hives, function ([hive, maps]) let (i = 0) - + - template.map(maps, function (map) - template.map(map.names, function (name) - - - - - - )) + - ) - } -
- {_("title.Mode")}{_("title.Command")}{_("title.Action")}
{!i++ ? hive.name : ""}{modeSign}{name}{map.rhs || map.action.toSource()}
; + let list = ["table", {}, + ["tr", { highlight: "Title" }, + ["td", {}], + ["td", { style: "padding-right: 1em;" }, _("title.Mode")], + ["td", { style: "padding-right: 1em;" }, _("title.Command")], + ["td", { style: "padding-right: 1em;" }, _("title.Action")]], + ["col", { style: "min-width: 6em; padding-right: 1em;" }], + hives.map(function ([hive, maps]) let (i = 0) [ + ["tr", { style: "height: .5ex;" }], + maps.map(function (map) + map.names.map(function (name) + ["tr", {}, + ["td", { highlight: "Title" }, !i++ ? hive.name : ""], + ["td", {}, modeSign], + ["td", {}, name], + ["td", {}, map.rhs || map.action.toSource()]])), + ["tr", { style: "height: .5ex;" }]])] - // TODO: Move this to an ItemList to show this automatically - if (list.*.length() === list.text().length() + 2) - dactyl.echomsg(_("map.none")); - else - commandline.commandOutput(list); + // E4X-FIXME + // // TODO: Move this to an ItemList to show this automatically + // if (list.*.length() === list.text().length() + 2) + // dactyl.echomsg(_("map.none")); + // else + commandline.commandOutput(list); } }, { }, { diff --git a/common/content/marks.js b/common/content/marks.js index 91ccb120..d179cd5a 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; /** * @scope modules diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index f2a18d83..c4f694f8 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; /** @scope modules */ diff --git a/common/content/tabs.js b/common/content/tabs.js index c1243672..fb03dce4 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -78,10 +78,14 @@ var Tabs = Module("tabs", { if (!node("dactyl-tab-number")) { let img = node("tab-icon-image"); if (img) { - let dom = DOM( - - - .elements(), document).appendTo(img.parentNode); + let dom = DOM([ + ["xul:hbox", { highlight: "tab-number" }, + ["xul:label", { key: "icon", align: "center", highlight: "TabIconNumber", + class: "dactyl-tab-icon-number" }]], + ["xul:hbox", { highlight: "tab-number" }, + ["html:div", { key: "label", highlight: "TabNumber", + class: "dactyl-tab-number" }]]], + document).appendTo(img.parentNode); update(tab, { get dactylOrdinal() Number(dom.nodes.icon.value), diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index b5837e54..55a09996 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -1629,6 +1629,7 @@ var DOM = Class("DOM", { }, { namespaces: { "": "http://www.w3.org/1999/xhtml", + dactyl: String(NS), html: "http://www.w3.org/1999/xhtml", xul: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" }