On FIrefox 9 and later, "bookmark this tree" feature was broken.
This commit is contained in:
parent
019ff57aed
commit
6bd6ddeea9
@ -27,8 +27,19 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
return document.getElementById('treestyletab-parent-blank-item');
|
return document.getElementById('treestyletab-parent-blank-item');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get isCreatingMultipleBookmarksInFolder()
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
window.arguments.length &&
|
||||||
|
window.arguments[0] &&
|
||||||
|
window.arguments[0].type == 'folder'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
init : function TSTBMEditable_init()
|
init : function TSTBMEditable_init()
|
||||||
{
|
{
|
||||||
|
if (this.isCreatingMultipleBookmarksInFolder) return;
|
||||||
|
|
||||||
// main browser window
|
// main browser window
|
||||||
if ('StarUI' in window) {
|
if ('StarUI' in window) {
|
||||||
if ('_doShowEditBookmarkPanel' in StarUI) {
|
if ('_doShowEditBookmarkPanel' in StarUI) {
|
||||||
@ -69,7 +80,12 @@ var TreeStyleTabBookmarksServiceEditable = {
|
|||||||
|
|
||||||
initEditUI : function TSTBMEditable_initEditUI()
|
initEditUI : function TSTBMEditable_initEditUI()
|
||||||
{
|
{
|
||||||
if (this.editUIInitialized || !('gEditItemOverlay' in window)) return;
|
if (
|
||||||
|
this.editUIInitialized ||
|
||||||
|
!('gEditItemOverlay' in window) ||
|
||||||
|
this.isCreatingMultipleBookmarksInFolder
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
|
||||||
var container = document.getElementById('editBookmarkPanelGrid');
|
var container = document.getElementById('editBookmarkPanelGrid');
|
||||||
if (!container) return;
|
if (!container) return;
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
in chrome.manifest:
|
in chrome.manifest:
|
||||||
overlay chrome://browser/content/browser.xul
|
overlay chrome://browser/content/browser.xul
|
||||||
chrome://***/content/bookmarkMultipleTabs.xul
|
chrome://***/content/bookmarkMultipleTabs.xul
|
||||||
|
overlay chrome://browser/content/places/bookmarkProperties.xul
|
||||||
|
chrome://***/content/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
overlay chrome://browser/content/places/bookmarkProperties2.xul
|
overlay chrome://browser/content/places/bookmarkProperties2.xul
|
||||||
chrome://***/content/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
chrome://***/content/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
|
|
||||||
@ -63,7 +65,7 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||||||
var tabs = Array.slice(aTabs).map(this.addBookmarkTabsFilter);
|
var tabs = Array.slice(aTabs).map(this.addBookmarkTabsFilter);
|
||||||
if (aFolderName)
|
if (aFolderName)
|
||||||
this.Prefs.setCharPref('temp.showMinimalAddMultiBookmarkUI.folderName', unescape(encodeURIComponent(aFolderName)));
|
this.Prefs.setCharPref('temp.showMinimalAddMultiBookmarkUI.folderName', unescape(encodeURIComponent(aFolderName)));
|
||||||
if ('showBookmarkDialog' in utils) { // Firefox 11 or later
|
if ('showBookmarkDialog' in utils) { // Firefox 9 or later
|
||||||
utils.showBookmarkDialog({
|
utils.showBookmarkDialog({
|
||||||
action : 'add',
|
action : 'add',
|
||||||
type : 'folder',
|
type : 'folder',
|
||||||
@ -72,7 +74,7 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||||||
hiddenRows : ['description', 'location', 'loadInSidebar', 'keyword']
|
hiddenRows : ['description', 'location', 'loadInSidebar', 'keyword']
|
||||||
}, window);
|
}, window);
|
||||||
}
|
}
|
||||||
else if ('showMinimalAddMultiBookmarkUI' in utils) { // Firefox 3 - 10
|
else if ('showMinimalAddMultiBookmarkUI' in utils) { // Firefox 3 - 8
|
||||||
utils.showMinimalAddMultiBookmarkUI(tabs);
|
utils.showMinimalAddMultiBookmarkUI(tabs);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -6,13 +6,15 @@
|
|||||||
in chrome.manifest:
|
in chrome.manifest:
|
||||||
overlay chrome://browser/content/browser.xul
|
overlay chrome://browser/content/browser.xul
|
||||||
chrome://***/content/bookmarkMultipleTabs.xul
|
chrome://***/content/bookmarkMultipleTabs.xul
|
||||||
|
overlay chrome://browser/content/places/bookmarkProperties.xul
|
||||||
|
chrome://***/content/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
overlay chrome://browser/content/places/bookmarkProperties2.xul
|
overlay chrome://browser/content/places/bookmarkProperties2.xul
|
||||||
chrome://***/content/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
chrome://***/content/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
|
|
||||||
in JS files:
|
in JS files:
|
||||||
window['piro.sakura.ne.jp'].bookmarkMultipleTabs.addBookmarkFor(tabsArray, folderName);
|
window['piro.sakura.ne.jp'].bookmarkMultipleTabs.addBookmarkFor(tabsArray, folderName);
|
||||||
|
|
||||||
license: The MIT License, Copyright (c) 2009 SHIMODA "Piro" Hiroshi
|
license: The MIT License, Copyright (c) 2009-2012 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
|
||||||
original:
|
original:
|
||||||
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/bookmarkMultipleTabs.xul
|
http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/bookmarkMultipleTabs.xul
|
||||||
|
@ -12,6 +12,7 @@ overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyl
|
|||||||
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
|
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
|
||||||
|
|
||||||
overlay chrome://browser/content/browser.xul chrome://treestyletab/content/res/bookmarkMultipleTabs.xul
|
overlay chrome://browser/content/browser.xul chrome://treestyletab/content/res/bookmarkMultipleTabs.xul
|
||||||
|
overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyletab/content/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
overlay chrome://browser/content/places/bookmarkProperties2.xul chrome://treestyletab/content/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
overlay chrome://browser/content/places/bookmarkProperties2.xul chrome://treestyletab/content/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
|
|
||||||
locale treestyletab en-US jar:chrome/treestyletab.jar!/locale/en-US/treestyletab/
|
locale treestyletab en-US jar:chrome/treestyletab.jar!/locale/en-US/treestyletab/
|
||||||
|
@ -12,6 +12,7 @@ overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyl
|
|||||||
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
|
overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul
|
||||||
|
|
||||||
overlay chrome://browser/content/browser.xul chrome://treestyletab/content/res/bookmarkMultipleTabs.xul
|
overlay chrome://browser/content/browser.xul chrome://treestyletab/content/res/bookmarkMultipleTabs.xul
|
||||||
|
overlay chrome://browser/content/places/bookmarkProperties.xul chrome://treestyletab/content/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
overlay chrome://browser/content/places/bookmarkProperties2.xul chrome://treestyletab/content/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
overlay chrome://browser/content/places/bookmarkProperties2.xul chrome://treestyletab/content/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
|
||||||
|
|
||||||
locale treestyletab en-US locale/en-US/treestyletab/
|
locale treestyletab en-US locale/en-US/treestyletab/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user