/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This file is loaded into the browser window scope. /* eslint-env mozilla/browser-window */
/** * Customization handler prepares this browser window for entering and exiting * customization mode by handling customizationstarting and aftercustomization * events.
*/ var CustomizationHandler = {
handleEvent(aEvent) { switch (aEvent.type) { case"customizationstarting": this._customizationStarting(); break; case"aftercustomization": this._afterCustomization(); break;
}
},
_customizationStarting() { // Disable the toolbar context menu items
let menubar = document.getElementById("main-menubar"); for (let childNode of menubar.children) {
childNode.setAttribute("disabled", true);
}
UpdateUrlbarSearchSplitterState();
PlacesToolbarHelper.customizeStart();
},
_afterCustomization() { // Update global UI elements that may have been added or removed if (AppConstants.platform != "macosx") {
updateEditUIVisibility();
}
PlacesToolbarHelper.customizeDone();
XULBrowserWindow.asyncUpdateUI(); // Re-enable parts of the UI we disabled during the dialog
let menubar = document.getElementById("main-menubar"); for (let childNode of menubar.children) {
childNode.setAttribute("disabled", false);
}
gBrowser.selectedBrowser.focus();
// Update the urlbar
gURLBar.setURI();
UpdateUrlbarSearchSplitterState();
},
};
var AutoHideMenubar = {
get _node() { deletethis._node; return (this._node = document.getElementById("toolbar-menubar"));
},
_contextMenuListener: {
contextMenu: null,
get active() { return !!this.contextMenu;
},
init(event) { // Ignore mousedowns in <menupopup>s. if (event.target.closest("menupopup")) { return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.