ライブラリ更新(Chromifox Basic( https://addons.mozilla.org/firefox/addon/8782 )との競合を解消)

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4196 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-04-27 09:40:40 +00:00
parent 2136134709
commit 26c41a1f1b
2 changed files with 21 additions and 7 deletions

View File

@ -14,15 +14,15 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
:root[tabFx2Compatible="2"] .tabbrowser-tab { :root[tabFx2Compatible="3"] .tabbrowser-tab {
-moz-binding: url(tabFx2Compatible.xml#tabbrowser-tab) !important; -moz-binding: url(tabFx2Compatible.xml#tabbrowser-tab) !important;
} }
:root[tabFx2Compatible="2"] .tabbrowser-tab[busy] > hbox > stack > .tab-icon-image { :root[tabFx2Compatible="3"] .tabbrowser-tab[busy] > hbox > stack > .tab-icon-image {
list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif") !important; list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif") !important;
opacity: 0.6; opacity: 0.6;
} }
:root[tabFx2Compatible="2"] .tabbrowser-tab[selected="true"]:focus > hbox > .tab-text { :root[tabFx2Compatible="3"] .tabbrowser-tab[selected="true"]:focus > hbox > .tab-text {
border: 1px dotted -moz-DialogText; border: 1px dotted -moz-DialogText;
} }

View File

@ -19,7 +19,7 @@
window.addEventListener('DOMContentLoaded', function() { window.addEventListener('DOMContentLoaded', function() {
window.removeEventListener('DOMContentLoaded', arguments.callee, true); window.removeEventListener('DOMContentLoaded', arguments.callee, true);
const currentRevision = 2; const currentRevision = 3;
var b = document.getElementById('content'); var b = document.getElementById('content');
if (!b || b.localName != 'tabbrowser') return; if (!b || b.localName != 'tabbrowser') return;
@ -38,10 +38,24 @@ window.addEventListener('DOMContentLoaded', function() {
} }
} }
switch (window.getComputedStyle(b.selectedTab, '').getPropertyValue('-moz-binding')) var url = window.getComputedStyle(b.selectedTab, '').getPropertyValue('-moz-binding');
url = url.match(/url\(['"]?(.+)['"]?\)/);
url = url ? url[1] : null ;
switch (url)
{ {
case 'url(chrome://browser/content/tabbrowser.xml#tabbrowser-tab)': // -Gecko 1.9 case 'chrome://browser/skin/browser.xml#tabbrowser-tab': // defied by theme
case 'url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab")': // Gecko 1.9.1- const Pref = Components.classes['@mozilla.org/preferences;1']
.getService(Components.interfaces.nsIPrefBranch);
var skin = decodeURIComponent(escape(Pref.getCharPref('general.skins.selectedSkin')));
switch (skin.toLowerCase())
{
case 'classic/1.0': // Default
case 'chromifox': // Chromifox Basic: https://addons.mozilla.org/firefox/addon/8782
break;
default:
return;
}
case 'chrome://browser/content/tabbrowser.xml#tabbrowser-tab': // built-in
root.setAttribute('tabFx2Compatible', currentRevision); root.setAttribute('tabFx2Compatible', currentRevision);
break; break;
} }