From c0a07be5bc7626ff827fc3faeda87ab7b1ccad33 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 9 Nov 2007 05:25:22 +0000 Subject: [PATCH] =?UTF-8?q?Firefox=203=E4=BB=A5=E9=99=8D=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC=E3=81=AE=E3=82=B9=E3=82=AF?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=AB=E3=83=90=E3=83=BC=E3=82=92=E5=B7=A6?= =?UTF-8?q?=E7=AB=AF=E3=81=AB=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=83=81?= =?UTF-8?q?=E3=82=A7=E3=83=83=E3=82=AF=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1533 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/config.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/content/treestyletab/config.js b/content/treestyletab/config.js index a522c783..f655f304 100644 --- a/content/treestyletab/config.js +++ b/content/treestyletab/config.js @@ -31,9 +31,17 @@ function onChangeGroupBookmarkRadio() function onChangeTabbarPosition(aOnChange) { var pos = document.getElementById('extensions.treestyletab.tabbar.position-radiogroup').value; - document.getElementById('extensions.treestyletab.tabbar.invertScrollbar-check').disabled = pos != 'left'; + var invertScrollbar = document.getElementById('extensions.treestyletab.tabbar.invertScrollbar-check'); + invertScrollbar.disabled = pos != 'left'; document.getElementById('extensions.treestyletab.tabbar.invertUI-check').disabled = pos != 'right'; + if (isGecko18()) { + invertScrollbar.removeAttribute('collapsed'); + } + else { + invertScrollbar.setAttribute('collapsed', true); + } + var indentPref = document.getElementById('extensions.treestyletab.enableSubtreeIndent'); var collapsePref = document.getElementById('extensions.treestyletab.allowSubtreeCollapseExpand'); var autoHidePref = document.getElementById('extensions.treestyletab.tabbar.autoHide.enabled'); @@ -45,13 +53,20 @@ function onChangeTabbarPosition(aOnChange) collapsePref.value = collapseCheck.checked = (pos == 'left' || pos == 'right'); } if (pos == 'left' || pos == 'right') { - indentCheck.setAttribute('style', 'visibility:collapse'); - autoHideCheck.removeAttribute('style'); + indentCheck.setAttribute('collapsed', true); + autoHideCheck.removeAttribute('collapsed'); } else { - indentCheck.removeAttribute('style'); - autoHideCheck.setAttribute('style', 'visibility:collapse'); + indentCheck.removeAttribute('collapsed'); + autoHideCheck.setAttribute('collapsed', true); } gTabbarPlacePositionInitialized = true; } + +function isGecko18() +{ + const XULAppInfo = Components.classes['@mozilla.org/xre/app-info;1'].getService(Components.interfaces.nsIXULAppInfo); + var version = XULAppInfo.platformVersion.split('.'); + return parseInt(version[0]) <= 1 && parseInt(version[1]) <= 8; +}