diff --git a/content/treestyletab/bookmarksOverlayEditable.js b/content/treestyletab/bookmarksOverlayEditable.js index 992228d3..0e97cf40 100644 --- a/content/treestyletab/bookmarksOverlayEditable.js +++ b/content/treestyletab/bookmarksOverlayEditable.js @@ -118,21 +118,16 @@ var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksService, document.getElementById('treestyletab-parent-label').setAttribute('value', TreeStyleTabUtils.treeBundle.getString('bookmarkProperty.parent.label')); this.blankItem.setAttribute('label', TreeStyleTabUtils.treeBundle.getString('bookmarkProperty.parent.blank.label')); - - TreeStyleTabUtils.doPatching(gEditItemOverlay._showHideRows, 'gEditItemOverlay._showHideRows', function(aName, aSource) { - return eval(aName+' = '+aSource.replace( - /(\}\)?)$/, - ' TreeStyleTabBookmarksServiceEditable.parentRow.collapsed = this._element("keywordRow").collapsed && this._element("folderRow").collapsed;\n' + - '$1' - )); - }, 'TreeStyleTab'); - if (Services.vc.compare(Services.appinfo.platformVersion, '40') >= 0) { // for Firefox 40 and later, after Bug 951651 TreeStyleTabUtils.doPatching(gEditItemOverlay.initPanel, 'gEditItemOverlay.initPanel', function(aName, aSource) { return eval(aName+' = '+aSource.replace( 'let showOrCollapse =', 'TreeStyleTabBookmarksServiceEditable.initParentMenuList(); $&' + ).replace( + /(\}\)?)$/, + ' TreeStyleTabBookmarksServiceEditable.parentRow.collapsed = this._element("keywordRow").collapsed && this._element("folderRow").collapsed;\n' + + '$1' )); }, 'TreeStyleTab'); } @@ -144,6 +139,14 @@ var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksService, '$& TreeStyleTabBookmarksServiceEditable.initParentMenuList();' )); }, 'TreeStyleTab'); + + TreeStyleTabUtils.doPatching(gEditItemOverlay._showHideRows, 'gEditItemOverlay._showHideRows', function(aName, aSource) { + return eval(aName+' = '+aSource.replace( + /(\}\)?)$/, + ' TreeStyleTabBookmarksServiceEditable.parentRow.collapsed = this._element("keywordRow").collapsed && this._element("folderRow").collapsed;\n' + + '$1' + )); + }, 'TreeStyleTab'); } TreeStyleTabUtils.doPatching(gEditItemOverlay.onItemMoved, 'gEditItemOverlay.onItemMoved', function(aName, aSource) {