From fd897c1f77347fa7f5da54b4a3b02a1cf2d912a0 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 20 Dec 2010 01:57:11 -0500 Subject: [PATCH] Further disable tab numbers on Gecko 1.9. --- common/content/help.xsl | 2 +- common/content/tabs.js | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/common/content/help.xsl b/common/content/help.xsl index 40d2c0f2..485c5b01 100644 --- a/common/content/help.xsl +++ b/common/content/help.xsl @@ -160,7 +160,7 @@ - + diff --git a/common/content/tabs.js b/common/content/tabs.js index 087168f9..0c250008 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -37,21 +37,22 @@ const Tabs = Module("tabs", { }, _updateTabCount: function () { - for (let [i, tab] in Iterator(this.visibleTabs)) { - function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); - if (!node("dactyl-tab-number")) { - let nodes = {}; - let dom = util.xmlToDom(.*, document, nodes); - let img = node("tab-icon-image"); - img.parentNode.appendChild(dom); - tab.__defineGetter__("ordinal", function () Number(nodes.icon.value)); - tab.__defineSetter__("ordinal", function (i) nodes.icon.value = nodes.label.textContent = i); + if (dactyl.has("Gecko2")) + for (let [i, tab] in Iterator(this.visibleTabs)) { + function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); + if (!node("dactyl-tab-number")) { + let nodes = {}; + let dom = util.xmlToDom(.*, document, nodes); + let img = node("tab-icon-image"); + img.parentNode.appendChild(dom); + tab.__defineGetter__("ordinal", function () Number(nodes.icon.value)); + tab.__defineSetter__("ordinal", function (i) nodes.icon.value = nodes.label.textContent = i); + } + tab.ordinal = i + 1; } - tab.ordinal = i + 1; - } statusline.updateTabCount(true); },