var TreeStyleTabBookmarksServiceEditable = { __proto__ : TreeStyleTabBookmarksService, instantApply : false, canceled : false, get parentRow() { return document.getElementById('treestyletab-parent-row'); }, get menulist() { return document.getElementById('treestyletab-parent-menulist'); }, get popup() { return document.getElementById('treestyletab-parent-popup'); }, get separator() { return document.getElementById('treestyletab-parent-blank-item-separator'); }, get blankItem() { return document.getElementById('treestyletab-parent-blank-item'); }, init : function TSTBMEditable_init() { // main browser window if ('StarUI' in window) { if ('_doShowEditBookmarkPanel' in StarUI) { eval('StarUI._doShowEditBookmarkPanel = '+StarUI._doShowEditBookmarkPanel.toSource().replace( '{', '{ TreeStyleTabBookmarksServiceEditable.initEditUI();' )); } if ('quitEditMode' in StarUI) { eval('StarUI.quitEditMode = '+StarUI.quitEditMode.toSource().replace( '{', '{ TreeStyleTabBookmarksServiceEditable.saveParentFor(this._itemId);' )); } if ('cancelButtonOnCommand' in StarUI) { eval('StarUI.cancelButtonOnCommand = '+StarUI.cancelButtonOnCommand.toSource().replace( '{', '{ TreeStyleTabBookmarksServiceEditable.canceled = true;' )); } } // Bookmarks Property dialog if ('BookmarkPropertiesPanel' in window) { eval('BookmarkPropertiesPanel._endBatch = '+BookmarkPropertiesPanel._endBatch.toSource().replace( 'PlacesUIUtils.ptm.endBatch();', '$& TreeStyleTabBookmarksServiceEditable.saveParentFor(this._itemId);' )); } // Places Organizer (Library) if ('PlacesOrganizer' in window) { this.instantApply = true; } this.initEditUI(); }, initEditUI : function TSTBMEditable_initEditUI() { if (this.editUIInitialized || !('gEditItemOverlay' in window)) return; var container = document.getElementById('editBookmarkPanelGrid'); if (!container) return; container = container.getElementsByTagName('rows')[0]; var range = document.createRange(); range.selectNodeContents(container); range.collapse(false); range.insertNode(range.createContextualFragment(