ライブラリ更新
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4768 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
c66a6570f5
commit
bcbcf6608f
@ -1,6 +1,7 @@
|
|||||||
TreeStyleTabService.overrideExtensionsPreInit = function() {
|
TreeStyleTabService.overrideExtensionsPreInit = function() {
|
||||||
|
|
||||||
// Highlander
|
// Highlander
|
||||||
|
// https://addons.mozilla.org/firefox/addon/4086
|
||||||
if ('Highlander' in window) {
|
if ('Highlander' in window) {
|
||||||
eval('Highlander.overrideHandleLinkClick = '+
|
eval('Highlander.overrideHandleLinkClick = '+
|
||||||
Highlander.overrideHandleLinkClick.toSource().replace(
|
Highlander.overrideHandleLinkClick.toSource().replace(
|
||||||
@ -11,6 +12,7 @@ TreeStyleTabService.overrideExtensionsPreInit = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PermaTabs
|
// PermaTabs
|
||||||
|
// https://addons.mozilla.org/firefox/addon/2558
|
||||||
if ('permaTabs' in window) {
|
if ('permaTabs' in window) {
|
||||||
// without delay, Firefox crashes on startup.
|
// without delay, Firefox crashes on startup.
|
||||||
eval('permaTabs.__init = '+
|
eval('permaTabs.__init = '+
|
||||||
@ -83,6 +85,7 @@ TreeStyleTabService.overrideExtensionsPreInit = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Session Manager
|
// Session Manager
|
||||||
|
// https://addons.mozilla.org/firefox/addon/2324
|
||||||
// We need to initialize TST before Session Manager restores the last session anyway!
|
// We need to initialize TST before Session Manager restores the last session anyway!
|
||||||
if ('gSessionManager' in window &&
|
if ('gSessionManager' in window &&
|
||||||
'onLoad_proxy' in gSessionManager &&
|
'onLoad_proxy' in gSessionManager &&
|
||||||
@ -94,6 +97,7 @@ TreeStyleTabService.overrideExtensionsPreInit = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FullerScreen
|
// FullerScreen
|
||||||
|
// https://addons.mozilla.org/firefox/addon/4650
|
||||||
if ('FS_onFullerScreen' in window) {
|
if ('FS_onFullerScreen' in window) {
|
||||||
'CheckIfFullScreen,FS_onFullerScreen,FS_onMouseMove'.split(',').forEach(function(aFunc) {
|
'CheckIfFullScreen,FS_onFullerScreen,FS_onMouseMove'.split(',').forEach(function(aFunc) {
|
||||||
if (!(aFunc in window)) return;
|
if (!(aFunc in window)) return;
|
||||||
@ -105,6 +109,7 @@ TreeStyleTabService.overrideExtensionsPreInit = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TooManyTabs
|
// TooManyTabs
|
||||||
|
// https://addons.mozilla.org/firefox/addon/9429
|
||||||
if ('tooManyTabs' in window) {
|
if ('tooManyTabs' in window) {
|
||||||
this.registerExpandTwistyAreaAllowance(function(aTabBrowser) {
|
this.registerExpandTwistyAreaAllowance(function(aTabBrowser) {
|
||||||
return false;
|
return false;
|
||||||
@ -156,7 +161,8 @@ TreeStyleTabService.overrideExtensionsOnInitBefore = function() {
|
|||||||
|
|
||||||
TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
||||||
|
|
||||||
if ('MultipleTabService' in window) { // Multiple Tab Handler
|
// Multiple Tab Handler
|
||||||
|
if ('MultipleTabService' in window) {
|
||||||
eval('MultipleTabService.showHideMenuItems = '+
|
eval('MultipleTabService.showHideMenuItems = '+
|
||||||
MultipleTabService.showHideMenuItems.toSource().replace(
|
MultipleTabService.showHideMenuItems.toSource().replace(
|
||||||
'var separators = ',
|
'var separators = ',
|
||||||
@ -478,9 +484,21 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
|
|
||||||
gBrowser.treeStyleTab.internallyTabMoving = true; // until "TMmoveTabTo" method is overwritten
|
gBrowser.treeStyleTab.internallyTabMoving = true; // until "TMmoveTabTo" method is overwritten
|
||||||
}
|
}
|
||||||
|
if ('TMP_Places' in window &&
|
||||||
|
'getTabFixedTitle' in TMP_Places) {
|
||||||
|
TreeStyleTabService.addBookmarkTabsFilter = function(aTab) {
|
||||||
|
var b = aTab.linkedBrowser;
|
||||||
|
var uri = b.currentURI;
|
||||||
|
return {
|
||||||
|
uri : uri,
|
||||||
|
title : TMP_Places.getTabFixedTitle(b, uri)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Super DragAndGo
|
// Super DragAndGo
|
||||||
|
// https://addons.mozilla.org/firefox/addon/137
|
||||||
if ('superDrag' in window) {
|
if ('superDrag' in window) {
|
||||||
eval('superDrag.onDrop = '+
|
eval('superDrag.onDrop = '+
|
||||||
superDrag.onDrop.toSource().replace(
|
superDrag.onDrop.toSource().replace(
|
||||||
@ -494,19 +512,9 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ('TMP_Places' in window &&
|
|
||||||
'getTabFixedTitle' in TMP_Places) {
|
|
||||||
TreeStyleTabService.addBookmarkTabsFilter = function(aTab) {
|
|
||||||
var b = aTab.linkedBrowser;
|
|
||||||
var uri = b.currentURI;
|
|
||||||
return {
|
|
||||||
uri : uri,
|
|
||||||
title : TMP_Places.getTabFixedTitle(b, uri)
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Drag de Go
|
// Drag de Go
|
||||||
|
// https://addons.mozilla.org/firefox/addon/2918
|
||||||
if ('ddg_ges' in window) {
|
if ('ddg_ges' in window) {
|
||||||
eval('ddg_ges.Open = '+
|
eval('ddg_ges.Open = '+
|
||||||
ddg_ges.Open.toSource().replace(
|
ddg_ges.Open.toSource().replace(
|
||||||
@ -527,7 +535,8 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ColorfulTab
|
// Colorful Tabs
|
||||||
|
// https://addons.mozilla.org/firefox/addon/1368
|
||||||
if ('clrtabsInit' in window) {
|
if ('clrtabsInit' in window) {
|
||||||
let listener = {
|
let listener = {
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function(aEvent)
|
||||||
@ -564,7 +573,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FLST (Focus Last Selected Tab)
|
// FLST (Focus Last Selected Tab)
|
||||||
// https://addons.mozilla.org/ja/firefox/addon/32
|
// https://addons.mozilla.org/firefox/addon/32
|
||||||
if ('flst' in window) {
|
if ('flst' in window) {
|
||||||
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
|
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
|
||||||
return !aTabBrowser.treeStyleTab.getPref('extensions.flst.enabled');
|
return !aTabBrowser.treeStyleTab.getPref('extensions.flst.enabled');
|
||||||
@ -573,14 +582,22 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
|
|
||||||
// Focus Last Selected Tab 0.9.5.x
|
// Focus Last Selected Tab 0.9.5.x
|
||||||
// http://www.gozer.org/mozilla/extensions/
|
// http://www.gozer.org/mozilla/extensions/
|
||||||
if (window['piro.sakura.ne.jp'].extensions.isInstalled('focuslastselectedtab@gozer.org') &&
|
if (window['piro.sakura.ne.jp'].extensions.isAvailable('focuslastselectedtab@gozer.org')) {
|
||||||
window['piro.sakura.ne.jp'].extensions.isEnabled('focuslastselectedtab@gozer.org')) {
|
|
||||||
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
|
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
|
||||||
return !aTabBrowser.selectedTab.hasAttribute('lastselected');
|
return !aTabBrowser.selectedTab.hasAttribute('lastselected');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LastTab
|
||||||
|
// https://addons.mozilla.org/firefox/addon/112
|
||||||
|
if ('LastTab' in window) {
|
||||||
|
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
|
||||||
|
return !aTabBrowser.treeStyleTab.getPref('extensions.lasttab.focusLastTabOnClose');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// FireGestures
|
// FireGestures
|
||||||
|
// https://addons.mozilla.org/firefox/addon/6366
|
||||||
if ('FireGestures' in window) {
|
if ('FireGestures' in window) {
|
||||||
eval('FireGestures.onExtraGesture = '+
|
eval('FireGestures.onExtraGesture = '+
|
||||||
FireGestures.onExtraGesture.toSource().replace(
|
FireGestures.onExtraGesture.toSource().replace(
|
||||||
@ -629,6 +646,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Greasemonkey
|
// Greasemonkey
|
||||||
|
// https://addons.mozilla.org/firefox/addon/748
|
||||||
if ('GM_BrowserUI' in window && 'openInTab' in GM_BrowserUI) {
|
if ('GM_BrowserUI' in window && 'openInTab' in GM_BrowserUI) {
|
||||||
eval('GM_BrowserUI.openInTab = '+
|
eval('GM_BrowserUI.openInTab = '+
|
||||||
GM_BrowserUI.openInTab.toSource().replace( // old
|
GM_BrowserUI.openInTab.toSource().replace( // old
|
||||||
@ -641,14 +659,8 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// LastTab
|
|
||||||
if ('LastTab' in window) {
|
|
||||||
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
|
|
||||||
return !aTabBrowser.treeStyleTab.getPref('extensions.lasttab.focusLastTabOnClose');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// SBM Counter
|
// SBM Counter
|
||||||
|
// http://miniturbo.org/products/sbmcounter/
|
||||||
if ('SBMCounter' in window) {
|
if ('SBMCounter' in window) {
|
||||||
eval('SBMCounter.action = '+
|
eval('SBMCounter.action = '+
|
||||||
SBMCounter.action.toSource().replace(
|
SBMCounter.action.toSource().replace(
|
||||||
@ -659,6 +671,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Aging Tabs
|
// Aging Tabs
|
||||||
|
// https://addons.mozilla.org/firefox/addon/3542
|
||||||
if ('agingTabs' in window) {
|
if ('agingTabs' in window) {
|
||||||
eval('agingTabs.setColor = '+
|
eval('agingTabs.setColor = '+
|
||||||
agingTabs.setColor.toSource().replace(
|
agingTabs.setColor.toSource().replace(
|
||||||
@ -669,6 +682,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Snap Links
|
// Snap Links
|
||||||
|
// https://addons.mozilla.org/firefox/addon/4336
|
||||||
if ('executeAction' in window && 'openTabs' in window) {
|
if ('executeAction' in window && 'openTabs' in window) {
|
||||||
eval('window.openTabs = '+
|
eval('window.openTabs = '+
|
||||||
window.openTabs.toSource().replace(
|
window.openTabs.toSource().replace(
|
||||||
@ -679,6 +693,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mouseless Browsing
|
// Mouseless Browsing
|
||||||
|
// https://addons.mozilla.org/firefox/addon/879
|
||||||
if ('mouselessbrowsing' in window &&
|
if ('mouselessbrowsing' in window &&
|
||||||
'EventHandler' in mouselessbrowsing) {
|
'EventHandler' in mouselessbrowsing) {
|
||||||
if ('execute' in mouselessbrowsing.EventHandler) {
|
if ('execute' in mouselessbrowsing.EventHandler) {
|
||||||
@ -712,6 +727,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Linky
|
// Linky
|
||||||
|
// https://addons.mozilla.org/firefox/addon/425
|
||||||
if ('LinkyContext' in window &&
|
if ('LinkyContext' in window &&
|
||||||
'prototype' in LinkyContext) {
|
'prototype' in LinkyContext) {
|
||||||
'doSelected,doSelectedText,doImages,doAll,doAllPics,doValidateAll,doValidateSelected'
|
'doSelected,doSelectedText,doImages,doAll,doAllPics,doValidateAll,doValidateSelected'
|
||||||
@ -730,6 +746,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// QuickDrag
|
// QuickDrag
|
||||||
|
// https://addons.mozilla.org/firefox/addon/6912
|
||||||
if ('QuickDrag' in window && '_loadTab' in QuickDrag) {
|
if ('QuickDrag' in window && '_loadTab' in QuickDrag) {
|
||||||
eval('QuickDrag._loadTab = '+
|
eval('QuickDrag._loadTab = '+
|
||||||
QuickDrag._loadTab.toSource().replace(
|
QuickDrag._loadTab.toSource().replace(
|
||||||
@ -740,6 +757,7 @@ TreeStyleTabService.overrideExtensionsOnInitAfter = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Autohide
|
// Autohide
|
||||||
|
// http://www.krickelkrackel.de/autohide/
|
||||||
if ('autoHIDE' in window) {
|
if ('autoHIDE' in window) {
|
||||||
let autoHideEventListener = {
|
let autoHideEventListener = {
|
||||||
handleEvent : function(aEvent)
|
handleEvent : function(aEvent)
|
||||||
|
@ -2,9 +2,12 @@
|
|||||||
Extensions Compatibility Library
|
Extensions Compatibility Library
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
if (window['piro.sakura.ne.jp'].extensions.isInstalled('my.extension.id@example.com') &&
|
if (window['piro.sakura.ne.jp'].extensions.isAvailable('my.extension.id@example.com'))
|
||||||
window['piro.sakura.ne.jp'].extensions.isEnabled('my.extension.id@example.com'))
|
|
||||||
window['piro.sakura.ne.jp'].extensions.goToOptions('my.extension.id@example.com');
|
window['piro.sakura.ne.jp'].extensions.goToOptions('my.extension.id@example.com');
|
||||||
|
// just same to:
|
||||||
|
// if (window['piro.sakura.ne.jp'].extensions.isInstalled('my.extension.id@example.com') &&
|
||||||
|
// window['piro.sakura.ne.jp'].extensions.isEnabled('my.extension.id@example.com'))
|
||||||
|
// window['piro.sakura.ne.jp'].extensions.goToOptions('my.extension.id@example.com');
|
||||||
|
|
||||||
lisence: The MIT License, Copyright (c) 2009 SHIMODA "Piro" Hiroshi
|
lisence: The MIT License, Copyright (c) 2009 SHIMODA "Piro" Hiroshi
|
||||||
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/license.txt
|
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/license.txt
|
||||||
@ -12,7 +15,7 @@
|
|||||||
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/extensions.js
|
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/extensions.js
|
||||||
*/
|
*/
|
||||||
(function() {
|
(function() {
|
||||||
const currentRevision = 1;
|
const currentRevision = 2;
|
||||||
|
|
||||||
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
|
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
|
||||||
|
|
||||||
@ -35,6 +38,11 @@
|
|||||||
Prefs : Components.classes['@mozilla.org/preferences;1']
|
Prefs : Components.classes['@mozilla.org/preferences;1']
|
||||||
.getService(Components.interfaces.nsIPrefBranch),
|
.getService(Components.interfaces.nsIPrefBranch),
|
||||||
|
|
||||||
|
isAvailable : function(aId)
|
||||||
|
{
|
||||||
|
return this.isInstalled(aId) && this.isEnabled(aId);
|
||||||
|
},
|
||||||
|
|
||||||
isInstalled : function(aId)
|
isInstalled : function(aId)
|
||||||
{
|
{
|
||||||
return this.ExtensionManager.getInstallLocation(aId);
|
return this.ExtensionManager.getInstallLocation(aId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user