PK R8^chrome.manifestcontent totaltoolbar chrome/content/ skin totaltoolbar global chrome/skin/global/ locale totaltoolbar en-US chrome/locale/en-US/ locale totaltoolbar ar chrome/locale/ar/ locale totaltoolbar be-BY chrome/locale/be-BY/ locale totaltoolbar cs-CZ chrome/locale/cs-CZ/ locale totaltoolbar da-DK chrome/locale/da-DK/ locale totaltoolbar de-DE chrome/locale/de-DE/ locale totaltoolbar el-GR chrome/locale/el-GR/ locale totaltoolbar en-GB chrome/locale/en-GB/ locale totaltoolbar es-AR chrome/locale/es-AR/ locale totaltoolbar es-ES chrome/locale/es-ES/ locale totaltoolbar fi-FI chrome/locale/fi-FI/ locale totaltoolbar fr-FR chrome/locale/fr-FR/ locale totaltoolbar he-IL chrome/locale/he-IL/ locale totaltoolbar hr-HR chrome/locale/hr-HR/ locale totaltoolbar hu-HU chrome/locale/hu-HU/ locale totaltoolbar it-IT chrome/locale/it-IT/ locale totaltoolbar ja chrome/locale/ja/ locale totaltoolbar ko-KR chrome/locale/ko-KR/ locale totaltoolbar lt-LT chrome/locale/lt-LT/ locale totaltoolbar nb-NO chrome/locale/nb-NO/ locale totaltoolbar nl-NL chrome/locale/nl-NL/ locale totaltoolbar pl-PL chrome/locale/pl-PL/ locale totaltoolbar pt-BR chrome/locale/pt-BR/ locale totaltoolbar pt-PT chrome/locale/pt-PT/ locale totaltoolbar sk-SK chrome/locale/sk-SK/ locale totaltoolbar ru-RU chrome/locale/ru-RU/ locale totaltoolbar sv-SE chrome/locale/sv-SE/ locale totaltoolbar tr-TR chrome/locale/tr-TR/ locale totaltoolbar uk-UA chrome/locale/uk-UA/ locale totaltoolbar zh-CN chrome/locale/zh-CN/ locale totaltoolbar zh-TW chrome/locale/zh-TW/ overlay chrome://browser/content/browser.xul chrome://totaltoolbar/content/totaltoolbar.xul overlay chrome://global/content/customizeToolbar.xul chrome://totaltoolbar/content/totaltoolbar_customize.xulPK R80h77 install.rdf alta88 Customize and place multiple toolbars almost anywhere. Customize statusbar too. http://totaltoolbar.mozdev.org totaltoolbar@mozdev.org TotalToolbar 1.2 https://www.mozdev.org/p/updates/totaltoolbar/totaltoolbar@mozdev.org/update.rdf 2 Functionality from All-in-One Sidebar (AiOS) by Ingo Wennemaring, based on Toolbar Enhancements by Stephen Clavering Many thanks to the translators at Babelzilla {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 3.0.* 3.0b4pre WINNT_x86-msvc Linux SunOS_sparc-sunc PK R8aachrome/content/totaltoolbar.js //var aiosOS = Components.classes['@mozilla.org/xre/app-info;1'] // .getService(Components.interfaces.nsIXULRuntime).OS; var tt_toolboxes = null; var tt_bindingBoxes = ["tt-toolbox-tableft", "tt-toolbox-tabright", "tt-toolbox-belowtabs"]; var gToolboxes, gToolbox, gToolboxDocument, docElt, gStatusbar, gStatusbarMode; // Give sidebarheader an id var sidebarthrobber = document.getElementById('sidebar-throbber'); if (sidebarthrobber) sidebarthrobber.parentNode.setAttribute('id', 'sidebarheader'); /* Onload initialization */ function tt_init() { windowType = document.documentElement.getAttribute('windowtype'); // debugTT("windowType); if (windowType != "navigator:browser") return; gToolbox = getNavToolbox(); gToolboxDocument = gToolbox.ownerDocument; gStatusbar = document.getElementById("status-bar"); // BrowserFullScreen erweitern (Toolboxen sichtbar/unsichtbar machen) //if(aiosOS != "Darwin") { var fx_BrowserFullScreen = BrowserFullScreen; BrowserFullScreen = function BrowserFullScreen() { fx_BrowserFullScreen(); tt_BrowserFullScreen(); } var fx_BrowserToolboxCustomizeDone = BrowserToolboxCustomizeDone; BrowserToolboxCustomizeDone = function BrowserToolboxCustomizeDone() { fx_BrowserToolboxCustomizeDone(); document.getElementById("cmd_CustomizeStatusbar").removeAttribute("disabled"); var dd = gStatusbar.getAttribute("tt_ondragdrop"); if (dd) { gStatusbar.setAttribute("ondragdrop", dd); gStatusbar.removeAttribute("tt_ondragdrop"); } } //} /* Give context menu items an id */ var toolbarContextMenu = document.getElementById('toolbar-context-menu'); if (toolbarContextMenu) { toolbarContextMenu.firstChild.setAttribute('id', 'toolbar-context-menu-sep1'); toolbarContextMenu.firstChild.nextSibling.setAttribute('id', 'toolbar-context-customize'); } /* Arrange toolbar context menu*/ toolbarContextMenu.insertBefore( document.getElementById('toolbar-context-menu-toggle_taskbar'), document.getElementById('toolbar-context-menu-sep1')); toolbarContextMenu.insertBefore( document.getElementById('tt-statusbar-customize'), document.getElementById('toolbar-context-customize')); // Label der Toolbareinstellungen tauschen, wenn der Browser im RTL-Modus ist (Sidebar rechts) var str_left = document.getElementById("tt-left").getAttribute('label'); var str_sidebarleft = document.getElementById("tt-sidebarleft").getAttribute('label'); var str_right = document.getElementById("tt-right").getAttribute('label'); try { var wStyle = document.defaultView.getComputedStyle(document.getElementById("browser"), ''); if(wStyle.direction == "rtl") { document.getElementById("tt-left").setAttribute('label', str_right); document.getElementById("tt-sidebarright").setAttribute('label', str_sidebarleft); document.getElementById("tt-right").setAttribute('label', str_left); } } catch(e) { } tt_initStatusbar(); tt_adjustToolboxWidth(true); } window.addEventListener("load", tt_init, false); //by Stephen Clavering with mods by eXXile function tt_getToolboxes(aType) { tt_toolboxes = []; if (aType == 'statusbar') tt_toolboxes.push(gStatusbar); else { var tt_tmpBoxes = document.getElementsByTagName('toolbox'); for(var z = 0; z < tt_tmpBoxes.length; z++) { tt_toolboxes.push(tt_tmpBoxes[z]); } for(var i = 0; i < tt_bindingBoxes.length; i++) { if(document.getElementById(tt_bindingBoxes[i])) tt_toolboxes.push(document.getElementById(tt_bindingBoxes[i])); } } return tt_toolboxes; } /* Set up statusbar */ function tt_initStatusbar() { var item = gStatusbar.firstChild; var defaultSet = []; var isHidden = gStatusbar.hasAttribute("hidden"); if (isHidden) gStatusbar.removeAttribute("hidden"); // Create pseudo palette while (item) { if (item.localName == "statusbarpanel") { var cloneItem = item.cloneNode(true) gStatusbar.palette.appendChild(cloneItem); } // Save all statusbar children defaultSet.push(item.id); item = item.nextSibling; } var currentSet = gStatusbar.getAttribute("currentset"); var currentSetItems = currentSet.split(","); gStatusbar.setAttribute("defaultset", defaultSet); gStatusbar.customizeDone = BrowserToolboxCustomizeDone; //Set removed state if (currentSet) { var item = gStatusbar.firstChild; while (item) { if (item.localName == "statusbarpanel") // Set 'removed' if item not in currentset if (currentSetItems.indexOf(item.id) == -1) item.setAttribute("removed", true); else item.removeAttribute("removed"); item = item.nextSibling; } //Reorder statusbar items according to currentset order for(var j = currentSetItems.length; j > 0; j--) { if (["separator", "spring", "spacer"].indexOf(currentSetItems[j-1]) != -1) gStatusbar.insertItem(currentSetItems[j-1], gStatusbar.firstChild, null, null); else { var item = gToolboxDocument.getElementById(currentSetItems[j-1]); // If no item, then currentset contains an id whose statusbarpanel has // been uninstalled, just skip; currentset will be cleaned up when done.. if (item) { gToolboxDocument.adoptNode(item); gStatusbar.insertBefore(item, gStatusbar.firstChild); } } } gStatusbar.setAttribute("currentset", currentSet); } if (isHidden) window.setTimeout('gStatusbar.setAttribute("hidden", true)', 20); } /* Reset statusbar with order and display of all items pre customization */ function tt_resetStatusbar() { var defaultSet = gStatusbar.getAttribute("defaultset"); var defaultSetItems = defaultSet.split(","); var item, nextSibling; if (defaultSet) { item = gStatusbar.firstChild; while (item) { nextSibling = item.nextSibling; // Remove any item not in defaultset if (defaultSetItems.indexOf(item.id) == -1) item.parentNode.removeChild(item); else item.removeAttribute("removed"); item = nextSibling; } //Reorder statusbar items according to defaultset order for(var j = defaultSetItems.length; j > 0; j--) { item = gToolboxDocument.getElementById(defaultSetItems[j-1]); if (item) { gToolboxDocument.adoptNode(item); gStatusbar.insertBefore(item, gStatusbar.firstChild); } } } } /* Set up toolbar context menu */ function tt_initCustomiseContext(evt, popup) { var toolbar = document.popupNode; while(toolbar.localName != "toolbar" && toolbar.localName != "statusbar") toolbar = toolbar.parentNode; var isStatusbar = toolbar.localName == "statusbar"; var isDefaultToolbar = toolbar.getAttribute('defaultset') != ""; var isCustomizableToolbar = toolbar.getAttribute('customizable'); var toolbox = isStatusbar ? toolbar : toolbar.parentNode; var isPlainToolbox = toolbox.getAttribute('class').indexOf('tt-toolbox-plain') >= 0; var child; // Einstellungen var mode = toolbar.getAttribute("mode"); var small = toolbar.getAttribute("iconsize") == "small"; var flexbuttons = toolbar.hasAttribute("flexbuttons"); var fullscreentoolbar = toolbar.hasAttribute("fullscreentoolbar"); var position = toolbox.getAttribute("id"); for(var i = 0; i < popup.childNodes.length; i++) { child = popup.childNodes[i]; // M O D E if(child.getAttribute('name') == "mode") { child.setAttribute('checked', child.getAttribute('value') == mode); child.hidden = isStatusbar; } // S M A L L I C O N S if(child.getAttribute('value') == "smallicons") { child.setAttribute('checked', small); child.setAttribute('disabled', mode == "text"); child.disabled = isStatusbar; popup.childNodes[i-1].hidden = isStatusbar; } // F L E X I B L E B U T T O N S if(child.getAttribute('value') == "flexbuttons") { child.setAttribute('checked', flexbuttons); // keine flexiblen Buttons in der Tabbar und der Statusleiste child.hidden = isPlainToolbox || isStatusbar; popup.childNodes[i-1].hidden = isPlainToolbox || isStatusbar; } // F U L L S C R E E N if(child.getAttribute('value') == "fullscreentoolbar") { child.setAttribute('checked', fullscreentoolbar); } // P O S I T I O N if(child.getAttribute('name') == "position") { child.setAttribute('checked', child.getAttribute('value') == position); // Hidden in Tabbar, der Statusleiste, Standard-Toolbars oder unkonfigurierbare Toolbars child.hidden = isPlainToolbox || isDefaultToolbar || !isCustomizableToolbar; // Separator hidden if(child.id == "position1") popup.childNodes[i-1].hidden = isPlainToolbox || isDefaultToolbar || !isCustomizableToolbar; } } } /* Change individual toolbar configuration */ function tt_setToolbarMode(evt, aPopup) { var toolbar = document.popupNode; while(toolbar.localName != "toolbar" && toolbar.localName != "statusbar") toolbar = toolbar.parentNode; var isStatusbar = toolbar.localName == "statusbar"; var toolbox = isStatusbar ? toolbar : toolbar.parentNode; var value = evt.originalTarget.value; value = (value == "top-toolbox") ? getNavToolbox().id : value; var group = evt.originalTarget.getAttribute("name"); // radio group if(value == "smallicons") { var small = evt.originalTarget.getAttribute("checked") == "true"; var size = small ? "small" : "large"; toolbox.setToolbarIconSize(toolbar, size); } else if(value == "fullscreentoolbar") { showInFullScreen = evt.originalTarget.getAttribute("checked") == "true"; // Don't have the toolbox binding on statusbar.. if (isStatusbar) { if (showInFullScreen) gStatusbar.setAttribute("fullscreentoolbar", true); else gStatusbar.removeAttribute("fullscreentoolbar"); document.persist(toolbar.id, "fullscreentoolbar"); } else toolbox.showToolbarInFullscreen(toolbar, showInFullScreen); } else if(value == "flexbuttons") { var flexbuttons = evt.originalTarget.getAttribute("checked") == "true"; toolbox.setToolbarFlexButtons(toolbar, flexbuttons); } else if(group == "mode") { toolbox.setToolbarMode(toolbar, value); } else if(group == "position") { // We could just remove the from its current location and append // to the desired toolbox, but that would mean we wouldn't respect the rule // that custom toolbars appear wherever the is. Also it // caused an interesting bug where all the items on the toolbar would be // duplicated sometimes after the toolbar was moved. Finally, we can't just // get the currentSet of the existing toolbar and pass it to // appendCustomToolbar because currentSet always returns "__empty" during // customisation, because all the items are wrapped in extra elements. docElt = gToolboxDocument.documentElement; var items = []; while(toolbar.hasChildNodes()) items.push(toolbar.removeChild(toolbar.lastChild)); var tbarName = toolbar.toolbarName; var customIndex = toolbar.getAttribute("customindex"); if(toolbox.toolbarset.hasAttribute('anonymous')) { // Must persist xbl 'below-tabs' toolbar's toolbarset on the document root var attrPrefix = '_toolbarset.' + toolbox.toolbarset.getAttribute('id') + '.toolbar'; if (docElt.hasAttribute(attrPrefix+customIndex)) { docElt.removeAttribute(attrPrefix+customIndex); // gToolboxDocument.persist(docElt.id, attrPrefix+customIndex); document.persist(docElt.id, attrPrefix+customIndex); } } else if(toolbox.toolbarset.hasAttribute("toolbar"+customIndex)) { // Remove regular custom toolbar's toolbarset on the document root toolbox.toolbarset.removeAttribute("toolbar"+customIndex); // gToolboxDocument.persist(toolbox.toolbarset.id, "toolbar"+customIndex); document.persist(toolbox.toolbarset.id, "toolbar"+customIndex); } toolbox.removeChild(toolbar); // localStore.Flush(); // Need to now clean up old toolbox: customToolbarCount, remaining toolbar // customindexes, toolbarset toolbarX numbering, and persisted values. var customCount = 0; for(var i = 0; i < toolbox.childNodes.length; ++i) { var toolbar = toolbox.childNodes[i]; if (toolbar.localName == "toolbar" && toolbar.getAttribute("customizable")) { // Calculate currentset and store it in the attribute. var currentSet = toolbar.currentSet; // toolbar.setAttribute("currentset", currentSet); customIndex = toolbar.getAttribute("customindex"); if (customIndex) { if(toolbox.toolbarset.hasAttribute('anonymous')) { // Must persist xbl 'below-tabs' toolbar index on the document root var attrPrefix = '_toolbarset.' + toolbox.toolbarset.getAttribute('id') + '.toolbar'; if (docElt.hasAttribute(attrPrefix+customIndex)){ docElt.removeAttribute(attrPrefix+customIndex); document.persist(docElt.id, attrPrefix+customIndex); } docElt.setAttribute(attrPrefix+(++customCount), toolbar.toolbarName + ":" + currentSet); toolbar.setAttribute("customindex", customCount); //adjust count document.persist(docElt.id, attrPrefix+customCount); } else { // Reindex custom toolbar info on the if (toolbox.toolbarset.hasAttribute("toolbar"+customIndex)) { toolbox.toolbarset.removeAttribute("toolbar"+customIndex); document.persist(toolbox.toolbarset.id, "toolbar"+customIndex); } toolbox.toolbarset.setAttribute("toolbar"+(++customCount), toolbar.toolbarName + ":" + currentSet); toolbar.setAttribute("customindex", customCount); //adjust count document.persist(toolbox.toolbarset.id, "toolbar"+customCount); } // localStore.Flush(); } } } toolbox.customToolbarCount = customCount; //number of remaining toolbars if (customCount == 0 && toolbox.getAttribute("class") != "toolbox-top") //none.. toolbox.setAttribute("empty", true); // Remove toolbarX attributes from toolbarset or xul doc root for removed // toolbars, ie any entries past those for toolbars already indexed.. if(toolbox.toolbarset.hasAttribute('anonymous')) { while (docElt.hasAttribute(attrPrefix+(++customCount))) { docElt.removeAttribute(attrPrefix+customCount); document.persist(docElt.id, attrPrefix+customCount); } } else { while (toolbox.toolbarset.hasAttribute("toolbar"+(++customCount))) { toolbox.toolbarset.removeAttribute("toolbar"+customCount); document.persist(toolbox.toolbarset.id, "toolbar"+customCount); } } // Create new toolbar var newToolbox = document.getElementById(value); var newToolbar = newToolbox.appendCustomToolbar(tbarName, "__empty", true); while(items.length) newToolbar.appendChild(items.pop()); toolbox = newToolbox; toolbar = newToolbar; // Retain options handleOptions("copy", toolbar); // Calculate currentset and store it in the attribute. var currentSet = toolbar.currentSet; customIndex = toolbar.getAttribute("customindex"); toolbar.setAttribute("currentset", currentSet); toolbox.removeAttribute("empty"); if(toolbox.toolbarset.hasAttribute('anonymous')) { // Must persist xbl 'below-tabs' toolbar on the document root var attrPrefix = '_toolbarset.' + toolbox.toolbarset.getAttribute('id') + '.toolbar'; docElt.setAttribute(attrPrefix+customIndex, toolbar.toolbarName + ":" + currentSet); document.persist(docElt.id, attrPrefix+customIndex); } else { // Persist custom toolbar info on the toolbox.toolbarset.setAttribute("toolbar"+customIndex, toolbar.toolbarName + ":" + currentSet); document.persist(toolbox.toolbarset.id, "toolbar"+customIndex); } } tt_adjustToolboxWidth(aPopup); } /* Set/unset fixed width for vertical toolbars */ function tt_adjustToolboxWidth(fix) { // Aufruf durch Drag-Event der Toolbox if(typeof fix == "object") { fix = false; window.setTimeout('tt_adjustToolboxWidth(true)', 200); } var computedStyle, myWidth; var vToolboxes = document.getElementsByAttribute('vertical', 'true'); for(var i = 0; i < vToolboxes.length; i++) { if(vToolboxes[i].tagName == "toolbox") { myWidth = 0; // Set fixed width if(fix) { var boxChilds = vToolboxes[i].childNodes; // Add up width of all toolbars in the toolbox for(var j = 0; j < boxChilds.length; j++) { if(boxChilds[j].tagName == "toolbar") { computedStyle = document.defaultView.getComputedStyle(boxChilds[j], null); myWidth = myWidth + parseInt(computedStyle.width); myWidth = myWidth + parseInt(computedStyle.paddingLeft); myWidth = myWidth + parseInt(computedStyle.paddingRight); myWidth = myWidth + parseInt(computedStyle.marginLeft); myWidth = myWidth + parseInt(computedStyle.marginRight); myWidth = myWidth + parseInt(computedStyle.borderLeftWidth); myWidth = myWidth + parseInt(computedStyle.borderRightWidth); } } vToolboxes[i].style.maxWidth = myWidth + "px"; } // Unset width else { vToolboxes[i].removeAttribute('width'); vToolboxes[i].removeAttribute('style'); } } } return true; } /* Clean up options from root doc for removed or empty toolbars */ function handleOptions(aType, toolbar) { if (toolbar.localName != "toolbar") return; var attr = '_toolbar.' + toolbar.id + "."; var toolbarOptions = ["mode", "iconsize", "fullscreentoolbar", "flexbuttons", "collapsed", "currentset"] for(var x = 0; x < toolbarOptions.length; ++x) { if (docElt.hasAttribute(attr+toolbarOptions[x])) { if (aType == "remove") { docElt.removeAttribute(attr+toolbarOptions[x]); gToolboxDocument.persist(docElt.id, attr+toolbarOptions[x]); } if (aType == "copy") { var val = docElt.getAttribute(attr+toolbarOptions[x]); toolbar.setAttribute(toolbarOptions[x], val); } } } } /* Console logger */ function debugTT(aMsg) { Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService) .logStringMessage("TotalToolbar::"+ arguments.callee.caller.name+": " + aMsg); } /* Show or hide toolbars in fullscreen mode */ function tt_BrowserFullScreen() { var toolboxes = []; // Get all vertical toolboxes in the array var vToolboxes = document.getElementsByAttribute('vertical', 'true'); for(var i = 0; i < vToolboxes.length; i++) { if(vToolboxes[i].tagName == "toolbox") toolboxes.push(vToolboxes[i]); } // Add xbl toolboxes to the array for(var j = 0; j < tt_bindingBoxes.length; j++) { if(document.getElementById(tt_bindingBoxes[j])) toolboxes.push(document.getElementById(tt_bindingBoxes[j])); } // Toolboxen durchlaufen for(i = 0; i < toolboxes.length; i++) { var boxChilds = toolboxes[i].childNodes; var fsChilds = 0; // Child-Elemente durchlaufen (Toolbars) for(j = 0; j < boxChilds.length; j++) { if(boxChilds[j].getAttribute("fullscreentoolbar") == "true") fsChilds++; } // If all toolbars hidden, make toolbox also hidden if(window.fullScreen) toolboxes[i].setAttribute('hidden', !(fsChilds > 0)); else toolboxes[i].setAttribute('hidden', false); } } //if(aiosOS != "Darwin") { /* Rewritten to pass all toolboxes to the Customize window */ BrowserCustomizeToolbar = function(aType) { // Disable the toolbar context menu items var menubar = document.getElementById("main-menubar"); for(var i = 0; i < menubar.childNodes.length; ++i) menubar.childNodes[i].setAttribute("disabled", true); document.getElementById("cmd_CustomizeToolbars").setAttribute("disabled", true); document.getElementById("cmd_CustomizeStatusbar").setAttribute("disabled", true); var splitter = document.getElementById("urlbar-search-splitter"); if (splitter) splitter.parentNode.removeChild(splitter); if (aType == "statusbar") tt_getToolboxes('statusbar'); else tt_getToolboxes('toolbars'); openDialog("chrome://global/content/customizeToolbar.xul", (aType == "statusbar") ? "CustomizeStatusbar" : "CustomizeToolbar", "chrome,all,dependent", gToolbox, tt_toolboxes); } //} /* Rewritten to show all toolboxes, handle statusbar */ onViewToolbarsPopupShowing = function (aEvent) { var popup = aEvent.target; var i; // keine Toolbars im "Toolbar Properties"-Men� anzeigen if(popup.parentNode.id == "tt-toolbar-properties") return; // Toolbar properties disabled for statusbar, for now.. var toolbar = document.popupNode; while(toolbar.localName != "toolbar" && toolbar.localName != "statusbar") toolbar = toolbar.parentNode; var isStatusbar = toolbar.localName == "statusbar"; document.getElementById("toolbar-context-customize") .setAttribute("hidden", isStatusbar ? true : false); document.getElementById("tt-statusbar-customize") .setAttribute("hidden", isStatusbar ? false : true); document.getElementById("toolbar-context-menu-toggle_taskbar") .setAttribute("checked", !gStatusbar.getAttribute("collapsed") && !gStatusbar.getAttribute("hidden")); // document.getElementById("tt-toolbar-properties") // .setAttribute("disabled", isStatusbar ? true : false); // Empty the menu for(i = popup.childNodes.length-1; i >= 0; --i) { var deadItem = popup.childNodes[i]; if(deadItem.hasAttribute("toolbarid")) popup.removeChild(deadItem); } var firstMenuItem = popup.firstChild; var toolboxIds = []; var toolboxes = document.getElementsByTagName('toolbox'); for(var z = 0; z < toolboxes.length; z++) toolboxIds.push(toolboxes[z].getAttribute('id')); toolboxIds.push("tt-toolbox-belowtabs"); for(var j = 0; j < toolboxIds.length; j++) { var toolbox = document.getElementById(toolboxIds[j]); if(toolbox) { for (i = 0; i < toolbox.childNodes.length; ++i) { var toolbar = toolbox.childNodes[i]; var toolbarName = toolbar.getAttribute("toolbarname"); var type = toolbar.getAttribute("type"); // inkl. Fix f�r PersonalMenu (CompactMenu) // => ansonsten kann die Men�leiste nicht �ber das Kontextmen� deaktiviert werden if(toolbarName && (type != "menubar" || typeof CompactMenuCE == "object")) { var menuItem = document.createElement("menuitem"); menuItem.setAttribute("toolbarid", toolbar.id); menuItem.setAttribute("type", "checkbox"); menuItem.setAttribute("label", toolbarName); menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey")); // Fix f�r z.B. Google-Toolbar menuItem.setAttribute("checked", !toolbar.getAttribute("collapsed") && !toolbar.getAttribute("hidden")); popup.insertBefore(menuItem, firstMenuItem); menuItem.addEventListener("command", onViewToolbarCommand, false); } toolbar = toolbar.nextSibling; } } } return; } /* Rewritten to be based on toolbar ids rather than the toolbarindex */ onViewToolbarCommand = function (aEvent) { var id = aEvent.originalTarget.getAttribute("toolbarid"); var toolbar = document.getElementById(id); var hide = !aEvent.originalTarget.getAttribute("checked"); toolbar.parentNode.hideToolbar(toolbar, hide); tt_adjustToolboxWidth(true); } PK R8/OOchrome/content/totaltoolbar.xml false null null 0 return Components.interfaces.nsIAccessibleProvider.XULToolbar; null null null PK R82 ;w*w*chrome/content/totaltoolbar.xul %browserDTD; %totaltoolbarDTD; %ttDTDnew; ]>