Google Toolbar Sidewikiとの競合を解消

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5139 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-09-28 12:06:34 +00:00
parent 32715c4cd9
commit d55a778206

View File

@ -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 {',
<![CDATA[
if ('treeStyleTab' in this.topLevelDocument_.getElementById('content')) {
let b = this.topLevelDocument_.getElementById('content');
let box = b.mPanelContainer.boxObject;
return {
height : box.height,
width : box.width,
top : box.y,
left : box.x,
right : this.topLevelWindow_.innerWidth - box.x - box.width,
tabBoxHeight : 0
};
}
$&]]>
));
}
}
};