diff --git a/content/treestyletab/hacks.js b/content/treestyletab/hacks.js index 14f2fc34..5e5813f9 100644 --- a/content/treestyletab/hacks.js +++ b/content/treestyletab/hacks.js @@ -92,6 +92,17 @@ TreeStyleTabService.overrideExtensionsPreInit = function() { '{ TreeStyleTabService.init();' )); } + + // FullerScreen + if ('FS_onFullerScreen' in window) { + 'CheckIfFullScreen,FS_onFullerScreen,FS_onMouseMove'.split(',').forEach(function(aFunc) { + if (!(aFunc in window)) return; + eval('window.'+aFunc+' = '+window[aFunc].toSource().replace( + /FS_data.mTabs.(removeAttribute\("moz-collapsed"\)|setAttribute\("moz-collapsed", "true"\));/g, + 'if (gBrowser.getAttribute(TreeStyleTabService.kTABBAR_POSITION) == "top") { $& }' + )); + }, this); + } }; TreeStyleTabService.overrideExtensionsOnInitBefore = function() { diff --git a/content/treestyletab/res/fullScreenCanvas.xul b/content/treestyletab/res/fullScreenCanvas.xul index f34762ce..c83798ac 100644 --- a/content/treestyletab/res/fullScreenCanvas.xul +++ b/content/treestyletab/res/fullScreenCanvas.xul @@ -143,16 +143,19 @@ window.addEventListener('DOMContentLoaded', function() { }, getZoomForFrame : function(aFrame) { - const Prefs = Components.classes['@mozilla.org/preferences;1'].getService(Components.interfaces.nsIPrefBranch);; + const Prefs = Components + .classes['@mozilla.org/preferences;1'] + .getService(Components.interfaces.nsIPrefBranch); try { if (Prefs.getBoolPref('browser.zoom.full')) - return aFrame + var zoom = aFrame .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsIDocShell) .contentViewer .QueryInterface(Components.interfaces.nsIMarkupDocumentViewer) .fullZoom; + return zoom; } catch(e) { } diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 439bea41..170f1ddb 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1156,9 +1156,6 @@ TreeStyleTabBrowser.prototype = { scrollBoxObject.getPosition(x, y); this.lastScrollX = x.value; this.lastScrollY = y.value; -// var tab = aEvent.originalTarget; -// var delta = tab.boxObject.height; -// scrollBoxObject.scrollTo(x.value, y.value-delta); } return;