From 63114ca99f785f20fef227338a1b05affcf22a4c Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Wed, 30 Oct 2013 01:40:20 +0900 Subject: [PATCH] Don't activate UI to manage tree relations for bookmarks in the "unsorted bookmarks" folder. We often store very large number of items into the folder, however we'll never open them as a group of bookmarks via middle click on the folder. On the other hand, if there are too many sibling bookmarks, TST can freeze to initialize the list of siblings. So I decided to disable the UI for bookmarks in the "unsorted bookmarks" folder. This decision is related to the issue #398. --- content/treestyletab/bookmarksOverlayEditable.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/treestyletab/bookmarksOverlayEditable.js b/content/treestyletab/bookmarksOverlayEditable.js index 00fbc488..e4b1ea54 100644 --- a/content/treestyletab/bookmarksOverlayEditable.js +++ b/content/treestyletab/bookmarksOverlayEditable.js @@ -153,6 +153,12 @@ var TreeStyleTabBookmarksServiceEditable = { this.canceled = false; + // Ignore bookmark in the "unsorted bookmarks" folder, because + // there can be very large number of bookmarks and they won't be + // opened as a tree. + if (PlacesUtils.bookmarks.getFolderIdForItem(id) == PlacesUtils.unfiledBookmarksFolderId) + return; + this._createSiblingsFragment(id, (function(aFragment) { var siblings = Array.slice(aFragment.childNodes) .map(function(aItem) {