1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 09:42:28 +01:00

Replace expression closures (function expressions - named and dynamic this).

Expression closures are to be axed. See https://bugzil.la/1083458.

Leaving deprecated() and literal() calls and method shorthand syntax
conversions until after the ESR overlap.
This commit is contained in:
Doug Kearns
2015-06-06 23:12:40 +10:00
parent 07b64b3197
commit b236add69d
43 changed files with 876 additions and 520 deletions

View File

@@ -62,7 +62,9 @@ var Tabs = Module("tabs", {
cleanup: function cleanup() {
for (let tab of this.allTabs) {
let node = function node(class_) document.getAnonymousElementByAttribute(tab, "class", class_);
let node = function node(class_) {
return document.getAnonymousElementByAttribute(tab, "class", class_);
};
for (let elem of ["dactyl-tab-icon-number", "dactyl-tab-number"].map(node))
if (elem)
elem.parentNode.parentNode.removeChild(elem.parentNode);
@@ -74,7 +76,9 @@ var Tabs = Module("tabs", {
updateTabCount: function updateTabCount() {
for (let [i, tab] of iter(this.visibleTabs)) {
let node = function node(class_) document.getAnonymousElementByAttribute(tab, "class", class_);
let node = function node(class_) {
return document.getAnonymousElementByAttribute(tab, "class", class_);
};
if (!node("dactyl-tab-number")) {
let img = node("tab-icon-image");
if (img) {