diff --git a/content/treestyletab/hacks.js b/content/treestyletab/hacks.js index 80925729..109664bc 100644 --- a/content/treestyletab/hacks.js +++ b/content/treestyletab/hacks.js @@ -802,4 +802,33 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() { window.addEventListener('unload', autoHideEventListener, false); } + + // Google Toolbar Sidewiki + if ('sidewikiWindowHandler' in window && + window.sidewikiWindowHandler && + sidewikiWindowHandler.barsContainer_ && + sidewikiWindowHandler.barsContainer_.geometry_ && + sidewikiWindowHandler.barsContainer_.geometry_.__proto__.getWindowSizeForDrawers) { + let func = sidewikiWindowHandler.barsContainer_.geometry_.__proto__.getWindowSizeForDrawers.toSource(); + if (func.indexOf('treeStyleTab') < 0) { + eval('sidewikiWindowHandler.barsContainer_.geometry_.__proto__.getWindowSizeForDrawers = '+func.replace( + 'return {', + + )); + } + } + };