diff options
author | Kris Maglione <maglione.k@gmail.com> | 2012-11-27 23:34:16 -0800 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2012-11-27 23:34:16 -0800 |
commit | 621ff6a37a6d3c56a9ae45b1d1fa414f6f837e09 (patch) | |
tree | 4701e3dd2995e39063bbc48847c53621b39f0cbe /common/content | |
parent | df81bcb1f9d2fba3bbe8374f520c0ad0eee30ffe (diff) | |
download | pentadactyl-621ff6a37a6d3c56a9ae45b1d1fa414f6f837e09.tar.gz |
Death to E4X and stuff.
Diffstat (limited to 'common/content')
-rw-r--r-- | common/content/autocommands.js | 2 | ||||
-rw-r--r-- | common/content/bookmarks.js | 2 | ||||
-rw-r--r-- | common/content/browser.js | 2 | ||||
-rw-r--r-- | common/content/help.js | 2 | ||||
-rw-r--r-- | common/content/hints.js | 8 | ||||
-rw-r--r-- | common/content/history.js | 2 | ||||
-rw-r--r-- | common/content/key-processors.js | 2 | ||||
-rw-r--r-- | common/content/mappings.js | 52 | ||||
-rw-r--r-- | common/content/marks.js | 2 | ||||
-rw-r--r-- | common/content/quickmarks.js | 2 | ||||
-rw-r--r-- | common/content/tabs.js | 12 |
11 files changed, 44 insertions, 44 deletions
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(<div highlight="hints"/>, 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(<span highlight="Hint" style="display: none;"/>, 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(<span highlight="Hint" dactyl:hl="HintImage" xmlns:dactyl={NS}/>, 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 = <table> - <tr highlight="Title"> - <td/> - <td style="padding-right: 1em;">{_("title.Mode")}</td> - <td style="padding-right: 1em;">{_("title.Command")}</td> - <td style="padding-right: 1em;">{_("title.Action")}</td> - </tr> - <col style="min-width: 6em; padding-right: 1em;"/> - { - template.map(hives, function ([hive, maps]) let (i = 0) - <tr style="height: .5ex;"/> + - template.map(maps, function (map) - template.map(map.names, function (name) - <tr> - <td highlight="Title">{!i++ ? hive.name : ""}</td> - <td>{modeSign}</td> - <td>{name}</td> - <td>{map.rhs || map.action.toSource()}</td> - </tr>)) + - <tr style="height: .5ex;"/>) - } - </table>; - - // 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); + 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;" }]])] + + // 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(<xul xmlns:xul={XUL} xmlns:html={XHTML}> - <xul:hbox highlight="tab-number"><xul:label key="icon" align="center" highlight="TabIconNumber" class="dactyl-tab-icon-number"/></xul:hbox> - <xul:hbox highlight="tab-number"><html:div key="label" highlight="TabNumber" class="dactyl-tab-number"/></xul:hbox> - </xul>.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), |