From 4f6ffd80e8f238b6987a315191b1c4e3ff7e5816 Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Sun, 23 Jan 2011 01:49:16 +0900 Subject: [PATCH] add special codes for Personal Titlebar ( https://addons.mozilla.org/irefox/addon/personal-titlebar/ ) --- content/treestyletab/hacks.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/content/treestyletab/hacks.js b/content/treestyletab/hacks.js index d50333cc..5cba579b 100644 --- a/content/treestyletab/hacks.js +++ b/content/treestyletab/hacks.js @@ -1207,6 +1207,38 @@ TreeStyleTabService.overrideExtensionsDelayed = function TSTService_overrideExte ); } + // Personal Titlebar + // https://addons.mozilla.org/irefox/addon/personal-titlebar/ + if (document.getElementById('personal-titlebar')) { + let listener = { + handleEvent : function(aEvent) + { + switch (aEvent.type) + { + case 'beforecustomization': + let (bar = document.getElementById('personal-titlebar')) { + bar.classList.remove(TreeStyleTabService.kTABBAR_TOOLBAR); + bar.style.top = ''; + bar.style.left = ''; + bar.style.width = ''; + bar.style.height = ''; + bar.removeAttribute('height'); + bar.removeAttribute('width'); + bar.removeAttribute('ordinal'); + } + break; + + case 'unload': + window.removeEventListener('beforecustomization', this, false); + window.removeEventListener('unload', this, false); + break; + } + } + }; + window.addEventListener('beforecustomization', listener, false); + window.addEventListener('unload', listener, false); + } + // Firefox Sync (Weave) // http://www.mozilla.com/en-US/firefox/sync/ if (