1. Nachrichten
  2. Forum
    1. Unerledigte Themen
    2. Forenregeln
  3. Spenden
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. camp-firefox.de
  2. qwerty963

Beiträge von qwerty963

  • Tab-Layout in Firefox 91.0

    • qwerty963
    • 13. August 2021 um 17:01

    Hallo.

    Ich möchte chrome.css verwenden, um die folgenden Attribute der Registerkartendarstellung zu ändern: insbesondere die derzeit geöffneten

    1. Runden Sie die Grenze

    2. Ändern Sie den Hintergrund

    3. Vergrößern und Farbe der Schaltfläche zum Schließen der Registerkarte ändern

    4. Ändern Sie die Farbe der Schaltfläche "Neuer Tab"

    Und ändern Sie die Farbe des Menüs von Schwarz auf Weiß.

  • Die Registerkartenleiste nach dem Update überlappt die Registerkartenleiste

    • qwerty963
    • 9. Januar 2020 um 09:45
    CSS
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    /* TABS: on bottom */
    #navigator-toolbox toolbar:not(#nav-bar):not(#toolbar-menubar) {-moz-box-ordinal-group:10}
    #TabsToolbar {-moz-box-ordinal-group:1000!important}
    #TabsToolbar {
    color: #000 !important; position: absolute !important; bottom: 0 !important; width: 100vw !important; display: block !important;
    }
    #tabbrowser-tabs { width: 100vw !important;
    }
    #main-window:not([chromehidden*="toolbar"]) #navigator-toolbox {padding-bottom: var(--tab-min-height) !important;}
    /* TABS: height */
    :root { --tab-toolbar-navbar-overlap: 0px !important; --tab-min-height: 33px !important; /* adjust to suit your needs */
    }
    :root #tabbrowser-tabs { --tab-min-height: 33px !important; /* needs to be the same as above under :root */ --tab-min-width: 80px !important;
    }
    #TabsToolbar { height: var(--tab-min-height) !important; margin-bottom: 1px !important; box-shadow: ThreeDShadow 0 -1px inset, -moz-dialog 0 1px !important; background-color: var(--toolbar-bgcolor) !important;
    }
    #tabbrowser-tabs,
    #tabbrowser-tabs > .tabbrowser-arrowscrollbox,
    .tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] { min-height: var(--tab-min-height) !important; max-height: var(--tab-min-height) !important;
    }
    /* drag space */
    .titlebar-spacer[type="pre-tabs"],
    .titlebar-spacer[type="post-tabs"] { width: 40px;
    }
    /* Override vertical shifts when moving a tab */
    #navigator-toolbox[movingtab] > #titlebar > #TabsToolbar { padding-bottom: unset !important;
    }
    #navigator-toolbox[movingtab] #tabbrowser-tabs { padding-bottom: unset !important; margin-bottom: unset !important;
    }
    #navigator-toolbox[movingtab] > #nav-bar { margin-top: unset !important;
    }
    /* hide windows-controls */
    #TabsToolbar #window-controls {display:none!important;}
    /* move caption buttons to right of Tab bar */
    #main-window[tabsintitlebar]:not([inFullscreen="true"]) #toolbar-menubar[autohide="true"] ~ #TabsToolbar .titlebar-buttonbox-container { position: fixed !important; right: 0 !important; top: calc(6px + var(--tab-min-height)) !important; display: block !important; visibility: visible !important;
    }
    #toolbar-menubar[autohide="true"] ~ #TabsToolbar {padding-right: 100px !important;}
    Alles anzeigen
  • Die Registerkartenleiste nach dem Update überlappt die Registerkartenleiste

    • qwerty963
    • 9. Januar 2020 um 09:35

    Die Registerkarte nach der Aktualisierung überlappt die Registerkarte, anstatt sich unter den Registerkarten zu befinden

  • Die Farbe der aktuell geöffneten Registerkarte

    • qwerty963
    • 10. Dezember 2019 um 21:46

    Hallo.

    Ich habe eine Frage, ist es möglich, die Farbe des aktuell geöffneten Tabs zu ändern? Nach Datei userChrome,css. Ich bin auch daran interessiert, die Farbe der X-Markierung zu ändern (Schließen der Karte)

  • Tab am unteren Rand von Firefox 71

    • qwerty963
    • 4. Dezember 2019 um 10:17

    Nach dem Upgrade von Firefox auf Version 71.0 befinden sich die Karten oben. Ich würde gerne ändern, wie es mir zuletzt ergangen ist.

  • Alte Suche mit Firefox 57

    • qwerty963
    • 16. Dezember 2018 um 07:21

    Und ist es möglich, zum Extraktor zurückzukehren, den ich in Version 63 hatte, um in 64 zu arbeiten

  • Alte Suche mit Firefox 57

    • qwerty963
    • 28. Oktober 2018 um 10:43

    Ich habe mich im Ordner geändert
    alte_suche
    alte Dateien mit Namen
    oldsearch_fx57 für neue.
    Und es funktioniert. Also kann ich nur dir danken.

  • Alte Suche mit Firefox 57

    • qwerty963
    • 28. Oktober 2018 um 10:37

    Frage von meiner Seite, wo ich es hinstellen sollte.

  • Alte Suche mit Firefox 57

    • qwerty963
    • 28. Oktober 2018 um 10:18

    Die user.chrome Datei habe ich selbst mit der Änderung der Oberfläche, des Aussehens und somit auch der Suchmaschine erstellt. Also habe ich einen Chromordner im Profil und darin einen Ordner für einen alten Freaker namens alte_suche und darin eine oldsearch_fx57 Datei.

    Mit folgendem Inhalt:

    XML
    <?xml version="1.0"?>
    
    
    <!DOCTYPE bindings [
    <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
    %browserDTD;
    ]>
    
    
    <bindings id="SearchBindings"
              xmlns="http://www.mozilla.org/xbl"
              xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
              xmlns:xbl="http://www.mozilla.org/xbl">
    
    
      <binding id="searchbar">
        <resources>
          <stylesheet src="chrome://browser/content/search/searchbarBindings.css"/>
          <stylesheet src="chrome://browser/skin/searchbar.css"/>
        </resources>
        <content>
          <xul:stringbundle src="chrome://browser/locale/search.properties"
                            anonid="searchbar-stringbundle"/>
    
    
          <xul:textbox class="searchbar-textbox"
                       anonid="searchbar-textbox"
                       type="autocomplete"
                       flex="1"
                       autocompletepopup="PopupSearchAutoComplete"
                       autocompletesearch="search-autocomplete"
                       autocompletesearchparam="searchbar-history"
                       maxrows="10"
                       completeselectedindex="true"
                       showcommentcolumn="true"
                       tabscrolling="true"
                       xbl:inherits="disabled,disableautocomplete,searchengine,src,newlines">
    
    
            <xul:box>
              <xul:toolbarbutton class="searchbar-engine-button"
                          type="menu"
                          anonid="searchbar-engine-button">
                <xul:image class="searchbar-engine-image" xbl:inherits="src"/>
                <xul:image class="searchbar-dropmarker-image"/>
                <xul:menupopup class="searchbar-popup"
                               anonid="searchbar-popup">
                  <xul:menuseparator/>
                  <xul:menuitem class="open-engine-manager"
                                anonid="open-engine-manager"
                                label="&changeSearchSettings.button;"
                                oncommand="openManager(event);"/>
                </xul:menupopup>
              </xul:toolbarbutton>
            </xul:box>
            <xul:hbox class="search-go-container">
              <xul:image class="search-go-button"
                         anonid="search-go-button"
                         onclick="handleSearchCommand(event);"
                         tooltiptext="Ctr_searchEndCap_label"/>
            </xul:hbox>
          </xul:textbox>
        </content>
    
    
        <implementation implements="nsIObserver">
          <constructor><![CDATA[
    
    
            if (this.parentNode.parentNode.localName == "toolbarpaletteitem")
              return;
            this._needToBuildPopup = true;
    
    
            this._initialized = true;
    
    
            this.searchService.init((function search_init_cb(aStatus) {
              if (!this._initialized)
                return;
    
    
              if (Components.isSuccessCode(aStatus)) {
                this.updateDisplay();
              } else {
                Components.utils.reportError("Cannot initialize search service, bailing out: " + aStatus);
              }
            }).bind(this));
          ]]></constructor>
    
    
          <destructor><![CDATA[
            this.destroy();
          ]]></destructor>
    
    
          <method name="destroy">
            <body><![CDATA[
            if (this._initialized) {
              this._initialized = false;
            }
    
    
            if (this._textboxInitialized && this._textbox.mController.input == this)
              this._textbox.mController.input = null;
            ]]></body>
          </method>
    
          <field name="_stringBundle">document.getAnonymousElementByAttribute(this, "anonid", "searchbar-stringbundle");</field>
          <field name="_textboxInitialized">false</field>
          <field name="_textbox">document.getAnonymousElementByAttribute(this, "anonid", "searchbar-textbox");</field>
          <field name="_popup">document.getAnonymousElementByAttribute(this, "anonid", "searchbar-popup");</field>
          <field name="_ss">null</field>
          <field name="_engines">null</field>
          <field name="FormHistory" readonly="true">
            (Components.utils.import("resource://gre/modules/FormHistory.jsm", {})).FormHistory;
          </field>
          <field name="PlacesUtils" readonly="true">
            (Components.utils.import("resource://gre/modules/PlacesUtils.jsm", {})).PlacesUtils;
          </field>
    
    
          <property name="engines" readonly="true">
            <getter><![CDATA[
              if (!this._engines)
                this._engines = this.searchService.getVisibleEngines();
              return this._engines;		
            ]]></getter>
          </property>
    
    
          <field name="searchButton">document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine-button");</field>
    
    
          <property name="currentEngine">
            <setter><![CDATA[
              let ss = this.searchService;
              ss.defaultEngine = ss.currentEngine = val;
              return val;
            ]]></setter>
            <getter><![CDATA[
              var currentEngine = this.searchService.currentEngine;
              // Return a dummy engine if there is no currentEngine
              return currentEngine || {name: "", uri: null};
            ]]></getter>
          </property>
    
    
          <property name="textbox" readonly="true"
                    onget="return this._textbox;"/>
    
    
          <property name="searchService" readonly="true">
            <getter><![CDATA[
              if (!this._ss) {
                const nsIBSS = Components.interfaces.nsIBrowserSearchService;
                this._ss =
                     Components.classes["@mozilla.org/browser/search-service;1"]
                               .getService(nsIBSS);
              }
              return this._ss;
            ]]></getter>
          </property>
    
    
          <property name="value" onget="return this._textbox.value;"
                                 onset="return this._textbox.value = val;"/>
    
    
          <method name="focus">
            <body><![CDATA[
              this._textbox.focus();
            ]]></body>
          </method>
    
    
          <method name="select">
            <body><![CDATA[
              this._textbox.select();
            ]]></body>
          </method>
    
    
          <method name="observe">
            <parameter name="aEngine"/>
            <parameter name="aTopic"/>
            <parameter name="aVerb"/>
            <body><![CDATA[
              if (aTopic == "browser-search-engine-modified") {
                switch (aVerb) {
                case "engine-removed":
                  this.offerNewEngine(aEngine);
                  break;
                case "engine-added":
                  this.hideNewEngine(aEngine);
                  break;
                case "engine-current":
                  // The current engine was changed.  Rebuilding the menu appears to
                  // confuse its idea of whether it should be open when it's just
                  // been clicked, so we force it to close now.
                  this._popup.hidePopup();
                  break;
                case "engine-changed":
                  // An engine was removed (or hidden) or added, or an icon was
                  // changed.  Do nothing special.
                }
    
    
                // Make sure the engine list is refetched next time it's needed
                this._engines = null;
    
                // Rebuild the popup and update the display after any modification.
                this.rebuildPopup();
                this.updateDisplay();
    
    
              }
    
    
            ]]></body>
          </method>
    
    
          <method name="offerNewEngine">
            <parameter name="aEngine"/>
            <body><![CDATA[
              for (let browser of gBrowser.browsers) {
                if (browser.hiddenEngines) {
    
    
                  var removeTitle = aEngine.wrappedJSObject.name;
                  for (var i = 0; i < browser.hiddenEngines.length; i++) {
                    if (browser.hiddenEngines[i].title == removeTitle) {
                      if (!browser.engines)
                        browser.engines = [];
                      browser.engines.push(browser.hiddenEngines[i]);
                      browser.hiddenEngines.splice(i, 1);
                      break;
                    }
                  }
                }
              }
              BrowserSearch.updateSearchButton();
    
    
            ]]></body>
          </method>
    
    
          <method name="hideNewEngine">
            <parameter name="aEngine"/>
            <body><![CDATA[
              for (let browser of gBrowser.browsers) {
                if (browser.engines) {
    
    
                  var removeTitle = aEngine.wrappedJSObject.name;
                  for (var i = 0; i < browser.engines.length; i++) {
                    if (browser.engines[i].title == removeTitle) {
                      if (!browser.hiddenEngines)
                        browser.hiddenEngines = [];
                      browser.hiddenEngines.push(browser.engines[i]);
                      browser.engines.splice(i, 1);
                      break;
                    }
                  }
                }
              }
              BrowserSearch.updateSearchButton();
            ]]></body>
          </method>
    
    
          <method name="setIcon">
            <parameter name="element"/>
            <parameter name="uri"/>
            <body><![CDATA[
              element.setAttribute("src", uri);
            ]]></body>
          </method>
    
    
          <method name="updateDisplay">
            <body><![CDATA[
              var uri = this.currentEngine.iconURI;
              this.setIcon(this, uri ? uri.spec : "");
    
    
              var name = this.currentEngine.name;
              var text = this._stringBundle.getFormattedString("searchtip", [name]);
    
    
              this._textbox.placeholder = name;
    
    
              this._textbox.label = text;
              this._textbox.tooltipText = text;
            ]]></body>
          </method>
    
    
          <method name="rebuildPopupDynamic">
            <body><![CDATA[
              this.rebuildPopup();
    
    
              var popup = this._popup;
    
    
              var items = popup.childNodes;
              for (var i = items.length - 1; i >= 0; i--) {
                if (items[i].classList.contains("addengine-item") ||
                    items[i].classList.contains("addengine-separator"))
                  popup.removeChild(items[i]);
              }
    
    		  var searchtextbox = document.getAnonymousElementByAttribute(document.getElementById("searchbar"), "anonid", "searchbar-textbox");
    		  var isRTL = getComputedStyle(searchtextbox, "").direction == "rtl";
    		  var outerRect = searchtextbox.getBoundingClientRect();
    		  var innerRect = searchtextbox.inputField.getBoundingClientRect();
    
    
    
    		  var width = 100; 
    		  width = isRTL ? Math.round(outerRect.left - outerRect.right) : Math.round(outerRect.right - outerRect.left);
    		  popup.setAttribute("width", width > 100 ? width : 100);
    
    
    
    
              var addengines = gBrowser.selectedBrowser.engines;
    
              if (addengines && addengines.length > 0) {
                const kXULNS =
                   "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    
    
                // Find the (first) separator in the remaining menu, or the first item
                // if no separators are present.
                var insertLocation = popup.firstChild;
                while (insertLocation.nextSibling &&
                       insertLocation.localName != "menuseparator") {
                  insertLocation = insertLocation.nextSibling;
                }
                if (insertLocation.localName != "menuseparator")
                  insertLocation = popup.firstChild;
    
    
                var separator = document.createElementNS(kXULNS, "menuseparator");
                separator.setAttribute("class", "addengine-separator");
                popup.insertBefore(separator, insertLocation);
    
    
                // Insert the "add this engine" items.
                for (var i = 0; i < addengines.length; i++) {
                  var menuitem = document.createElement("menuitem");
                  var engineInfo = addengines[i];
                  var labelStr =
                      this._stringBundle.getFormattedString("cmd_addFoundEngine",
                                                            [engineInfo.title]);
                  menuitem = document.createElementNS(kXULNS, "menuitem");
                  menuitem.setAttribute("class", "menuitem-iconic addengine-item");
                  menuitem.setAttribute("label", labelStr);
                  menuitem.setAttribute("tooltiptext", engineInfo.uri);
                  menuitem.setAttribute("uri", engineInfo.uri);
                  if (engineInfo.icon)
                    this.setIcon(menuitem, engineInfo.icon);
                  menuitem.setAttribute("title", engineInfo.title);
                  popup.insertBefore(menuitem, insertLocation);
                }
              }
            ]]></body>
          </method>
    
    
          <method name="rebuildPopup">
            <body><![CDATA[
              var popup = this._popup;
    
    
              // Clear the popup, down to the first separator
              while (popup.firstChild && popup.firstChild.localName != "menuseparator")
                popup.removeChild(popup.firstChild);
    
    
    		  const kXULNS =
                   "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    
    
    		  try {
    			let Preferences =
    			  Cu.import("resource://gre/modules/Preferences.jsm", {}).Preferences;
    			let pref = Preferences.get("browser.search.hiddenOneOffs");
    			let hiddenList = pref ? pref.split(",") : [];
    
    
    			this._engines = Services.search.getVisibleEngines()
    								  .filter(e => hiddenList.indexOf(e.name) == -1);
    		  } catch(e){}
    
    
              var engines = this.engines;
              for (var i = engines.length - 1; i >= 0; --i) {
                var menuitem = document.createElementNS(kXULNS, "menuitem");
                var name = engines[i].name;
                menuitem.setAttribute("label", name);
                menuitem.setAttribute("class", "menuitem-iconic searchbar-engine-menuitem menuitem-with-favicon");
    
    
                if (engines[i] == this.currentEngine)
                  menuitem.setAttribute("selected", "true");
                var tooltip = this._stringBundle.getFormattedString("searchtip", [name]);
                menuitem.setAttribute("tooltiptext", tooltip);
                if (engines[i].iconURI)
                  this.setIcon(menuitem, engines[i].iconURI.spec);
                popup.insertBefore(menuitem, popup.firstChild);
                menuitem.engine = engines[i];
              }
    
    
              this._needToBuildPopup = false;
            ]]></body>
          </method>
    
          <method name="openManager">
            <parameter name="aEvent"/>
            <body><![CDATA[
    			openPreferences("paneSearch");
            ]]></body>
          </method>
    
    
          <method name="selectEngine">
            <parameter name="aEvent"/>
            <parameter name="isNextEngine"/>
            <body><![CDATA[
    
    
              var newIndex = this.engines.indexOf(this.currentEngine);
              newIndex += isNextEngine ? 1 : -1;
    
    
              if (newIndex >= 0 && newIndex < this.engines.length) {
                this.currentEngine = this.engines[newIndex];
              }
    
    
              aEvent.preventDefault();
              aEvent.stopPropagation();
    
    
    
            ]]></body>
          </method>
    
    
          <method name="handleSearchCommand">
            <parameter name="aEvent"/>
            <parameter name="aEngine"/>
            <body><![CDATA[
              var textBox = this._textbox;
              var textValue = textBox.value;
    
    
              var where = "current";
    		  var newTabPref = Services.prefs.getBranch("browser.search.").getBoolPref("openintab");
    
    		  if(newTabPref) {
    		    where = "tab";
    		  }
    
              // Open ctrl/cmd clicks on one-off buttons in a new background tab.
              if (aEvent && aEvent.originalTarget.getAttribute("anonid") == "search-go-button") {
                if (aEvent.button == 2)
                  return;
    
    			where = whereToOpenLink(aEvent, false, true);
    
    			if (aEvent.button == 1) {
                  if(!Services.prefs.getBranch("extensions.classicthemerestorer.").getBoolPref("osearch_meoit2"))
    			    where = "tab-background";
    			}
    
    
              }
              else {
                if ((aEvent instanceof KeyboardEvent) && aEvent.altKey) {
                  where = "tab";
    			  if(newTabPref) where = "current";
    			}
    
                if ((aEvent instanceof MouseEvent) && (aEvent.button == 1 ||
                                                       aEvent.ctrlKey)) {
                  if(Services.prefs.getBranch("extensions.classicthemerestorer.").getBoolPref("osearch_meoit"))
    			    where = "tab";
    			  else
    			    where = "tab-background";
    			}
              }
    
              this.doSearch(textValue, where, aEngine);
    
    
              if (where == "tab-background")
                this.focus();
    
    
    		  // clear input after search
    		  /*
    		  setTimeout(function(){
    			textBox.value="";
    		  },200);
    		  */
    
    		  // revert to default engine after search
    		  /*
    		  var back_to_default_search = Components.classes["@mozilla.org/browser/search-service;1"]
    										.getService(Components.interfaces.nsIBrowserSearchService);
    		  back_to_default_search.defaultEngine = back_to_default_search.getVisibleEngines()[0];
    
    		  this.updateDisplay();	
    		  */
    
    
            ]]></body>
          </method>
    
    
          <method name="doSearch">
            <parameter name="aData"/>
            <parameter name="aWhere"/>
            <parameter name="aEngine"/>
            <body><![CDATA[
              var textBox = this._textbox;
    
              if(aWhere == "tab-background" && Services.prefs.getBranch("extensions.classicthemerestorer.").getBoolPref("osearch_meoit"))
    			aWhere = "tab";
    
    
              // Save the current value in the form history
              if (aData && !PrivateBrowsingUtils.isWindowPrivate(window)) {
                this.FormHistory.update(
                  { op : "bump",
                    fieldname : textBox.getAttribute("autocompletesearchparam"),
                    value : aData },
                  { handleError : function(aError) {
                      Components.utils.reportError("Saving search to form history failed: " + aError.message);
                  }});
              }
    
    
              let engine = aEngine || this.currentEngine;
              var submission = engine.getSubmission(aData, null, "searchbar");
    
    
              // null parameter below specifies HTML response for search
              let params = {
                postData: submission.postData,
                inBackground: aWhere == "tab-background"
              };
    
    
              openUILinkIn(submission.uri.spec,
                           aWhere == "tab-background" ? "tab" : aWhere,
                           params);
            ]]></body>
          </method>
        </implementation>
    
    
        <handlers>
          <handler event="command"><![CDATA[
            const target = event.originalTarget;
            if (target.engine) {
              this.currentEngine = target.engine;
            } else if (target.classList.contains("addengine-item")) {
              var searchService =
                Components.classes["@mozilla.org/browser/search-service;1"]
                          .getService(Components.interfaces.nsIBrowserSearchService);
              // We only detect OpenSearch files
              var type = Components.interfaces.nsISearchEngine.DATA_XML;
              // Select the installed engine if the installation succeeds
              var installCallback = {
                onSuccess: engine => this.currentEngine = engine
              }
              searchService.addEngine(target.getAttribute("uri"), type,
                                      target.getAttribute("src"), false,
                                      installCallback);
            }
            else
              return;
    
    
            this.focus();
            this.select();
    		this.updateDisplay();
    
          ]]></handler>
    
    
          <handler event="popupshowing" action="this.rebuildPopupDynamic();"/>
    
    
          <handler event="DOMMouseScroll"
                   phase="capturing"
                   modifiers="accel"
                   action="this.selectEngine(event, (event.detail > 0));"/>
    
    
          <handler event="focus">
          <![CDATA[
    
    
            this.currentEngine.speculativeConnect({window: window});
          ]]></handler>
        </handlers>
      </binding>
    
     <binding id="searchbar-textbox"
          extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
        <implementation implements="nsIObserver">
          <constructor><![CDATA[
            const kXULNS =
              "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    
    
            if (document.getBindingParent(this).parentNode.parentNode.localName ==
                "toolbarpaletteitem")
              return;
    
    
            // Initialize fields
            this._stringBundle = document.getBindingParent(this)._stringBundle;
            this._prefBranch =
                      Components.classes["@mozilla.org/preferences-service;1"]
                                .getService(Components.interfaces.nsIPrefBranch);
            this._suggestEnabled =
                this._prefBranch.getBoolPref("browser.search.suggest.enabled");
    
    
            if (this._prefBranch.getBoolPref("browser.urlbar.clickSelectsAll"))
              this.setAttribute("clickSelectsAll", true);
    
    
            // Add items to context menu and attach controller to handle them
            var textBox = document.getAnonymousElementByAttribute(this,
                                                  "anonid", "textbox-input-box");
            var cxmenu = document.getAnonymousElementByAttribute(textBox,
                                              "anonid", "input-box-contextmenu");
            var pasteAndSearch;
            cxmenu.addEventListener("popupshowing", function() {
              BrowserSearch.searchBar._textbox.closePopup();
              if (!pasteAndSearch)
                return;
              var controller = document.commandDispatcher.getControllerForCommand("cmd_paste");
              var enabled = controller.isCommandEnabled("cmd_paste");
              if (enabled)
                pasteAndSearch.removeAttribute("disabled");
              else
                pasteAndSearch.setAttribute("disabled", "true");
            }, false);
    
    
            var element, label, akey;
    
    
            element = document.createElementNS(kXULNS, "menuseparator");
            cxmenu.appendChild(element);
    
    
            this.setAttribute("aria-owns", this.popup.id);
    
    
            var insertLocation = cxmenu.firstChild;
            while (insertLocation.nextSibling &&
                   insertLocation.getAttribute("cmd") != "cmd_paste")
              insertLocation = insertLocation.nextSibling;
            if (insertLocation) {
              element = document.createElementNS(kXULNS, "menuitem");
              label = this._stringBundle.getString("cmd_pasteAndSearch");
              element.setAttribute("label", label);
              element.setAttribute("anonid", "paste-and-search");
              element.setAttribute("oncommand", "BrowserSearch.pasteAndSearch(event)");
              cxmenu.insertBefore(element, insertLocation.nextSibling);
              pasteAndSearch = element;
            }
    
    
            element = document.createElementNS(kXULNS, "menuitem");
            label = this._stringBundle.getString("cmd_clearHistory");
            akey = this._stringBundle.getString("cmd_clearHistory_accesskey");
            element.setAttribute("label", label);
            element.setAttribute("accesskey", akey);
            element.setAttribute("cmd", "cmd_clearhistory");
            cxmenu.appendChild(element);
    
    
            element = document.createElementNS(kXULNS, "menuitem");
            label = this._stringBundle.getString("cmd_showSuggestions");
            akey = this._stringBundle.getString("cmd_showSuggestions_accesskey");
            element.setAttribute("anonid", "toggle-suggest-item");
            element.setAttribute("label", label);
            element.setAttribute("accesskey", akey);
            element.setAttribute("cmd", "cmd_togglesuggest");
            element.setAttribute("type", "checkbox");
            element.setAttribute("checked", this._suggestEnabled);
            element.setAttribute("autocheck", "false");
            this._suggestMenuItem = element;
            cxmenu.appendChild(element);
    
    
            this.controllers.appendController(this.searchbarController);
            document.getBindingParent(this)._textboxInitialized = true;
    
    
            // Add observer for suggest preference
            /*var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                                .getService(Components.interfaces.nsIPrefBranch);
            prefs.addObserver("browser.search.suggest.enabled", this, false);*/
          ]]></constructor>
    
    
          <destructor><![CDATA[
              var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                                  .getService(Components.interfaces.nsIPrefBranch);
              prefs.removeObserver("browser.search.suggest.enabled", this);
    
    
            // Because XBL and the customize toolbar code interacts poorly,
            // there may not be anything to remove here
            try {
              this.controllers.removeController(this.searchbarController);
            } catch (ex) { }
          ]]></destructor>
    
    
          <field name="_stringBundle"/>
          <field name="_prefBranch"/>
          <field name="_suggestMenuItem"/>
          <field name="_suggestEnabled"/>
    
    
          <property name="searchParam"
                    onget="return this.getAttribute('autocompletesearchparam') +
                           (PrivateBrowsingUtils.isWindowPrivate(window) ? '|private' : '');"
                    onset="this.setAttribute('autocompletesearchparam', val); return val;"/>
    
    
          <method name="openPopup">
            <body><![CDATA[
              var popup = this.popup;
              if (!popup.mPopupOpen) {
    
    
                popup.hidden = false;
    
    
                // Don't roll up on mouse click in the anchor for the search UI.
               /* if (popup.id == "PopupSearchAutoComplete") {
                  popup.setAttribute("norolluponanchor", "true");
                }*/
    
    
                popup.mInput = this;
                popup.view = this.controller.QueryInterface(Components.interfaces.nsITreeView);
                popup.invalidate();
    
    
                popup.showCommentColumn = this.showCommentColumn;
                popup.showImageColumn = this.showImageColumn;
    
    
                document.popupNode = null;
    
    			var isRTL = getComputedStyle(this, "").direction == "rtl";
                var outerRect = this.getBoundingClientRect();
                var innerRect = this.inputField.getBoundingClientRect();
    
    
    			var width = 100;
    
    			width = isRTL ? Math.round(outerRect.left - outerRect.right) : Math.round(outerRect.right - outerRect.left);
    
    
    			if(Services.appinfo.OS=="Darwin") {
    			  width = width - 1; // MacOSX
    			}
    
    			popup.setAttribute("width", width > 100 ? width : 100);
    
    
                popup.openPopup(this, "after_start", 0, -1, false, false);
              }
            ]]></body>
          </method>
    
    
          <method name="observe">
            <parameter name="aSubject"/>
            <parameter name="aTopic"/>
            <parameter name="aData"/>
            <body><![CDATA[
              if (aTopic == "nsPref:changed") {
                this._suggestEnabled =
                  this._prefBranch.getBoolPref("browser.search.suggest.enabled");
                this._suggestMenuItem.setAttribute("checked", this._suggestEnabled);
              }
            ]]></body>
          </method>
    
    
          <method name="openSearch">
            <body>
              <![CDATA[
                // Don't open search popup if history popup is open
                if (!this.popupOpen) {
                  let searchBox = document.getBindingParent(this);
                  searchBox.searchButton.open = true;
                  return false;
                }
                return true;
              ]]>
            </body>
          </method>
    
    
          <method name="onTextEntered">
            <parameter name="aEvent"/>
            <body><![CDATA[
              var evt = aEvent || this.mEnterEvent;
    
    
              let engine;
    
    
              if (this.mEnterEvent && this._selectionDetails &&
                  this._selectionDetails.currentIndex != -1) {
                this._selectionDetails = null;
              }
              document.getBindingParent(this).handleSearchCommand(evt, engine);
    
    
              this.mEnterEvent = null;
            ]]></body>
          </method>
    
    
          <method name="advanceSelection">
            <parameter name="aForward"/>
            <parameter name="aSkipSuggestions"/>
            <parameter name="aCycleEngines"/>
            <body><![CDATA[
              let popup = this.popup;
    
    		  let selectedButton = this.selectedButton;
    
    
              let suggestionsHidden;
              if (!aSkipSuggestions) {
                let suggestions = document.getAnonymousElementByAttribute(popup, "anonid", "tree");
                suggestionsHidden = suggestions.getAttribute("collapsed") == "true";
                aSkipSuggestions = suggestionsHidden;
              }
    
    
              // If the last suggestion is selected, DOWN selects the first button.
              if (!aSkipSuggestions && aForward &&
                  popup.selectedIndex + 1 == popup.view.rowCount) {
                return false;
              }
    
    
              if (!selectedButton) {
                // If no selection, select the first button or ...
                if (aForward && aSkipSuggestions) {
                  return true;
                }
    
    
                if (!aForward && (aCycleEngines || suggestionsHidden ||
                                  (!aSkipSuggestions && popup.selectedIndex == -1))) {
                  // the last button.
                  return true;
                }
              }
    
    
              return false;
            ]]></body>
          </method>
    
    
          <method name="handleKeyboardNavigation">
            <parameter name="aEvent"/>
            <body><![CDATA[
              let popup = this.popup;
              if (!popup.popupOpen)
                return;
    
    
              let list = document.getAnonymousElementByAttribute(popup, "anonid",
                                                                 "search-panel-one-offs");
              if (!list) // remove this check when removing the old search UI.
                return;
              // accel + up/down changes the default engine and shouldn't affect
              // the selection on the one-off buttons.
              if (aEvent.ctrlKey)
                return;
    
    
              let stopEvent = false;
    
    
              // Alt + up/down is very similar to (shift +) tab but differs in that
              // it loops through the list, whereas tab will move the focus out.
              if (aEvent.altKey &&
                  (aEvent.keyCode == KeyEvent.DOM_VK_DOWN ||
                   aEvent.keyCode == KeyEvent.DOM_VK_UP)) {
                stopEvent =
                  this.advanceSelection(aEvent.keyCode == KeyEvent.DOM_VK_DOWN,
                                        true, true);
              }
              else if (aEvent.keyCode == KeyEvent.DOM_VK_DOWN ||
                       aEvent.keyCode == KeyEvent.DOM_VK_UP) {
                stopEvent = this.advanceSelection(aEvent.keyCode == KeyEvent.DOM_VK_DOWN);
              }
              else if (aEvent.keyCode == KeyEvent.DOM_VK_TAB) {
                stopEvent = this.advanceSelection(!aEvent.shiftKey, true);
              }
    
    
              if (stopEvent) {
                aEvent.preventDefault();
                aEvent.stopPropagation();
              }
            ]]></body>
          </method>
    
    
          <field name="searchbarController" readonly="true"><![CDATA[({
            _self: this,
            supportsCommand: function(aCommand) {
              return aCommand == "cmd_clearhistory" ||
                     aCommand == "cmd_togglesuggest";
            },
    
    
            isCommandEnabled: function(aCommand) {
              return true;
            },
    
    
            doCommand: function (aCommand) {
              switch (aCommand) {
                case "cmd_clearhistory":
                  var param = this._self.getAttribute("autocompletesearchparam");
    
    
                  let searchBar = this._self.parentNode;
    
    
                  BrowserSearch.searchBar.FormHistory.update({ op : "remove", fieldname : param }, null);
                  this._self.value = "";
                  break;
                case "cmd_togglesuggest":
                  // The pref observer will update _suggestEnabled and the menu
                  // checkmark.
                  this._self._prefBranch.setBoolPref("browser.search.suggest.enabled",
                                                     !this._self._suggestEnabled);
                  break;
                default:
                  // do nothing with unrecognized command
              }
            }
          })]]></field>
        </implementation>
    
    
        <handlers>
          <handler event="keypress" phase="capturing"
                   action="return this.handleKeyboardNavigation(event);"/>
    
    
          <handler event="keypress" keycode="VK_UP" modifiers="accel"
                   phase="capturing"
                   action="document.getBindingParent(this).selectEngine(event, false);"/>
    
    
          <handler event="keypress" keycode="VK_DOWN" modifiers="accel"
                   phase="capturing"
                   action="document.getBindingParent(this).selectEngine(event, true);"/>
    
    
          <handler event="keypress" keycode="VK_DOWN" modifiers="alt"
                   phase="capturing"
                   action="return this.openSearch();"/>
    
    
          <handler event="keypress" keycode="VK_UP" modifiers="alt"
                   phase="capturing"
                   action="return this.openSearch();"/>
    
    
          <handler event="keypress" keycode="VK_F4"
                   phase="capturing"
                   action="return this.openSearch();"/>
    
    
          <handler event="dragover">
          <![CDATA[
            var types = event.dataTransfer.types;
            if (types.contains("text/plain") || types.contains("text/x-moz-text-internal"))
              event.preventDefault();
          ]]>
          </handler>
    
    
          <handler event="drop">
          <![CDATA[
            var dataTransfer = event.dataTransfer;
            var data = dataTransfer.getData("text/plain");
            if (!data)
              data = dataTransfer.getData("text/x-moz-text-internal");
            if (data) {
              event.preventDefault();
              this.value = data;
    		  document.getBindingParent(this).handleSearchCommand();
            }
          ]]>
          </handler>
    
          <handler event="click"><![CDATA[
            if (event.button == 2)
              return; // ignore right clicks.
    		else if (event.button == 1) { // middle click
    
    
              let button = event.originalTarget;
              let engine = button.engine || button.parentNode.engine;
    
    
              if (!engine) return;
    
    
              let searchbar = document.getElementById("searchbar");
    		  searchbar.searchButton.open = false;
              searchbar.handleSearchCommand(event, engine);
    		}
          ]]></handler>
    
    
        </handlers>
      </binding>
    
    
    </bindings>
    Alles anzeigen

    Edit 2002Andreas
    Text in Klammercode gesetzt.

  • Alte Suche mit Firefox 57

    • qwerty963
    • 28. Oktober 2018 um 09:32

    Nach der Aktualisierung von Firefox auf Version 63 ist die alte Suchmaschine nicht mehr funktionsfähig. Dh es ist sichtbar, Sie können den Inhalt eingeben, aber nach dem Drücken der Lupe oder Eingabe passiert nichts.

Unterstütze uns!

Jährlich (2025)

59,1 %

59,1% (384,24 von 650 EUR)

Jetzt spenden
  1. Kontakt
  2. Datenschutz
  3. Impressum
Community-Software: WoltLab Suite™
Mastodon