diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-01-13 23:55:51 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-01-13 23:55:51 -0500 |
commit | 7a023373bf96469eb7c16946e685031dfe281366 (patch) | |
tree | 5783c36d31be6878c88682da590653dcb6bf6a0d /common/content/tabs.js | |
parent | 3e4fa31139e394de54e2bcba6c54e6dc96dc139f (diff) | |
download | pentadactyl-7a023373bf96469eb7c16946e685031dfe281366.tar.gz |
Fix some issues with magically toolbarless popups.
Update issue 148
This fixes some particular issues with these types of popups, but I
no longer see the original problem (though window.content is
certainly still null).
Diffstat (limited to 'common/content/tabs.js')
-rw-r--r-- | common/content/tabs.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/common/content/tabs.js b/common/content/tabs.js index af69e406..c34ad6cb 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -55,15 +55,17 @@ var Tabs = Module("tabs", { if (dactyl.has("Gecko2")) { let node = function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); if (!node("dactyl-tab-number")) { - let nodes = {}; - let dom = util.xmlToDom(<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>.*, document, nodes); let img = node("tab-icon-image"); - img.parentNode.appendChild(dom); - tab.__defineGetter__("dactylOrdinal", function () Number(nodes.icon.value)); - tab.__defineSetter__("dactylOrdinal", function (i) nodes.icon.value = nodes.label.textContent = i); + if (img) { + let nodes = {}; + let dom = util.xmlToDom(<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>.*, document, nodes); + img.parentNode.appendChild(dom); + tab.__defineGetter__("dactylOrdinal", function () Number(nodes.icon.value)); + tab.__defineSetter__("dactylOrdinal", function (i) nodes.icon.value = nodes.label.textContent = i); + } } } tab.setAttribute("dactylOrdinal", i + 1); |