Wenn ich beide Scripte aus Beitrag Nr. 77 nehme, funktioniert das einwandfrei in der aktuellen Version vom Nightly.
Auch das erste Script allein funktioniert perfekt.
Wenn ich beide Scripte aus Beitrag Nr. 77 nehme, funktioniert das einwandfrei in der aktuellen Version vom Nightly.
Auch das erste Script allein funktioniert perfekt.
OK, ansonsten müsste für Fx64+ dein erstes/ursprüngliches Script so aussehen:
(function() {
var searchbar = document.getElementById("searchbar");
searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
let textBox = this._textbox;
if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && this.FormHistory.enabled) {
this.FormHistory.update({
op: "bump",
fieldname: textBox.getAttribute("autocompletesearchparam"),
value: aData,
}, {
handleError(aError) {
Cu.reportError("Saving search to form history failed: " + aError.message);
},
});
}
let engine = aEngine || this.currentEngine;
let submission = engine.getSubmission(aData, null, "searchbar");
let telemetrySearchDetails = this.telemetrySearchDetails;
this.telemetrySearchDetails = null;
if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
telemetrySearchDetails = null;
}
const details = {
isOneOff: aOneOff,
isSuggestion: (!aOneOff && telemetrySearchDetails),
selection: telemetrySearchDetails,
};
BrowserSearch.recordSearchInTelemetry(engine, "searchbar", details);
let params = {
postData: submission.postData,
};
if (aParams) {
for (let key in aParams) {
params[key] = aParams[key];
}
}
openTrustedLinkIn(submission.uri.spec, "tab", params);
this.value = '';
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
};
}());
Alles anzeigen
Die Suche wird immer in einem neuen Tab geöffnet, die Suchmaschine wird auf die erste in der Liste zurückgesetzt und das Suchfeld wird geleert.
Vielen Dank, ich nutze in Nightly nun nur noch das Script aus Post 80... damit klappt alles so, wie gewünscht..
Edit: Post 80 ist gemeint...
Ich habe heute ein weiteres Update veröffentlicht. Einige Kleinigkeiten wurden berichtigt und neue Funktionen hinzugefügt. Sicherlich wird der ein oder andere damit etwas anfangen können
Oh ja, darüber freue ich mich sehr. Vor allem verschwindet der Suchbegriff nun wieder direkt nach Auslösen der Suche. Das Verschwinden nach einer definierten Zeit war für mich oftmals eher unpraktisch, ebenso wie das Stehenlassen des Suchbegriffs.
Also, vielen Dank für das Skript mit den vielen Optionen :klasse:
das Script aus Post 70... damit klappt alles so, wie gewünscht..
Das glaube ich nicht, in Post Nr. 70 gibt’s doch gar kein Skript. Es wäre sowieso das Beste, direkt in Github nach Updates zu schauen – die gab es hier nämlich.
Tippfehler... Nr. 80 war gemeint.. und ich schaue schon regelmäßig nach UpDates... :wink:
Tja, nun ist in Firefox 65.0.1 wieder der Wurm drin...
Ich nutze also das nachfolgende Script, um die Suchleiste automatisch zu leeren, leider funktioniert das Script in so fern nicht mehr, das ich zwar die zu benutzende Suchmaschine auswählen kann, aber immer die Suchmaschine ausgewählt wird, die an 1. Stelle steht.. Das Suchfeld leert sich, wie gewünscht, nach 5 Sekunden, bzw nach Abschicken der Suche....
Liegts am Code? In Nightly muss ich erst testen, bin aber jetzt erst mal zur Arbeit....
/* Suchfeld automatisch leeren und in neuem Tab öffnen*/
setTimeout(function() {
if (!window.BrowserSearch)
return;
var searchbar = BrowserSearch.searchBar;
if (!searchbar)
return;
var textbox = searchbar.getElementsByClassName('searchbar-textbox')[0];
var input = document.getAnonymousElementByAttribute(textbox, 'anonid', 'input');
var tId;
input.addEventListener('input', function() {
clearTimeout(tId);
tId = setTimeout(function() {
input.value = '';
document.getElementById('PopupSearchAutoComplete').hidePopup();
}, 5000);
});
}, 0);
(function() {
var searchbar = document.getElementById("searchbar");
searchbar._doSearchInternal = searchbar.doSearch;
searchbar.doSearch = function(aData, aInNewTab) {
this._doSearchInternal(aData, aInNewTab);
// clear the search term
this.value = "";
// reset the search engine
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
};
}());
Alles anzeigen
Teste bitte mal:
(function() {
var searchbar = document.getElementById("searchbar");
searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
let textBox = this._textbox;
if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && this.FormHistory.enabled) {
this.FormHistory.update({
op: "bump",
fieldname: textBox.getAttribute("autocompletesearchparam"),
value: aData,
}, {
handleError(aError) {
Cu.reportError("Saving search to form history failed: " + aError.message);
},
});
}
let engine = aEngine || this.currentEngine;
let submission = engine.getSubmission(aData, null, "searchbar");
let telemetrySearchDetails = this.telemetrySearchDetails;
this.telemetrySearchDetails = null;
if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
telemetrySearchDetails = null;
}
const details = {
isOneOff: aOneOff,
isSuggestion: (!aOneOff && telemetrySearchDetails),
selection: telemetrySearchDetails,
};
BrowserSearch.recordSearchInTelemetry(engine, "searchbar", details);
let params = {
postData: submission.postData,
};
if (aParams) {
for (let key in aParams) {
params[key] = aParams[key];
}
}
openTrustedLinkIn(submission.uri.spec, "tab", params);
this.value = '';
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
};
}());
Alles anzeigen
Vielen Dank!
Ganz kurz noch, das funktioniert, das Suchwort wird mit Absenden der Suche auch gelöscht..
Mein bisheriger Code hatte den Charme, das das Suchwort auch gelöscht wurde, wenn die Suche NICHT abgeschickt wird...
Jetzt bin ich aber weg...
Diesen dann zusätzlich nutzen:
setTimeout(function() {
if (!window.BrowserSearch)
return;
var searchbar = BrowserSearch.searchBar;
if (!searchbar)
return;
var textbox = searchbar.getElementsByClassName('searchbar-textbox')[0];
var input = document.getAnonymousElementByAttribute(textbox, 'anonid', 'input');
var tId;
input.addEventListener('input', function() {
clearTimeout(tId);
tId = setTimeout(function() {
input.value = '';
document.getElementById('PopupSearchAutoComplete').hidePopup();
}, 5000);
});
}, 0);
Alles anzeigen
Das probiere ich morgen, nach der Schicht... vielen Dank bis dahin...
Jawoll, so ist es perfekt... :klasse:
Vielen Dank...
Hier nochmal das komplette Script....
/* Suchfeld automatisch leeren und in neuem Tab oeffnen */
(function() {
var searchbar = document.getElementById("searchbar");
searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
let textBox = this._textbox;
if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && this.FormHistory.enabled) {
this.FormHistory.update({
op: "bump",
fieldname: textBox.getAttribute("autocompletesearchparam"),
value: aData,
}, {
handleError(aError) {
Cu.reportError("Saving search to form history failed: " + aError.message);
},
});
}
let engine = aEngine || this.currentEngine;
let submission = engine.getSubmission(aData, null, "searchbar");
let telemetrySearchDetails = this.telemetrySearchDetails;
this.telemetrySearchDetails = null;
if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
telemetrySearchDetails = null;
}
const details = {
isOneOff: aOneOff,
isSuggestion: (!aOneOff && telemetrySearchDetails),
selection: telemetrySearchDetails,
};
BrowserSearch.recordSearchInTelemetry(engine, "searchbar", details);
let params = {
postData: submission.postData,
};
if (aParams) {
for (let key in aParams) {
params[key] = aParams[key];
}
}
openTrustedLinkIn(submission.uri.spec, "tab", params);
this.value = '';
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
};
}());
setTimeout(function() {
if (!window.BrowserSearch)
return;
var searchbar = BrowserSearch.searchBar;
if (!searchbar)
return;
var textbox = searchbar.getElementsByClassName('searchbar-textbox')[0];
var input = document.getAnonymousElementByAttribute(textbox, 'anonid', 'input');
var tId;
input.addEventListener('input', function() {
clearTimeout(tId);
tId = setTimeout(function() {
input.value = '';
document.getElementById('PopupSearchAutoComplete').hidePopup();
}, 5000);
});
}, 0);
Alles anzeigen
Freut mich, war gern geschehen
... hier im Nightly mit der neuen Suche und dem Script funktioniert meine Suche überhaupt nicht mehr. Alle Suchmaschinen sind verschwunden bzw tauchen in den Einstellungen nicht auf....
Habe nun alle entsprechenden Scripte und Codes entfernt. Trotzdem kann ich keine Suche starten.. Ist das nur bei mir so?
Teste bitte:
setTimeout(function() {
if (!window.BrowserSearch)
return;
var searchbar = BrowserSearch.searchBar;
if (!searchbar)
return;
var textbox = searchbar.getElementsByClassName('searchbar-textbox')[0];
var input = document.getAnonymousElementByAttribute(textbox, 'anonid', 'input');
var tId;
input.addEventListener('input', function() {
clearTimeout(tId);
tId = setTimeout(function() {
input.value = '';
document.getElementById('PopupSearchAutoComplete').hidePopup();
}, 5000);
});
}, 0);
(function() {
var searchbar = document.getElementById("searchbar");
searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
let textBox = this._textbox;
if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && this.FormHistory.enabled) {
this.FormHistory.update({
op: "bump",
fieldname: textBox.getAttribute("autocompletesearchparam"),
value: aData,
}, {
handleError(aError) {
Cu.reportError("Saving search to form history failed: " + aError.message);
},
});
}
let engine = aEngine || this.currentEngine;
let submission = engine.getSubmission(aData, null, "searchbar");
let telemetrySearchDetails = this.telemetrySearchDetails;
this.telemetrySearchDetails = null;
if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
telemetrySearchDetails = null;
}
const details = {
isOneOff: aOneOff,
isSuggestion: (!aOneOff && telemetrySearchDetails),
selection: telemetrySearchDetails,
};
BrowserSearch.recordSearchInTelemetry(engine, "searchbar", details);
let params = {
postData: submission.postData,
};
if (aParams) {
for (let key in aParams) {
params[key] = aParams[key];
}
}
openTrustedLinkIn(submission.uri.spec, "tab", params);
this.value = '';
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
};
}());
Alles anzeigen
Prima, passt, vielen Dank... :klasse:
Ich muss das Thema auch nochmal anschneiden. Ich verwende Aris' Skript aus Beitrag #76. Das funktioniert bei mir im Nightly nicht. Ich habe den Thread nicht dauernd verfolgt, vielleicht steht da auch schon irgendwo die Lösung. Mir geht es dabei erst einmal nicht um das automatische Leeren des Suchfelds. Aber wenn das gleich mit funktioniert, umso besser...
Skript:
// 'Alternative search bar' script for Firefox 60+ by Aris
//
// Based on 'search revert' script by '2002Andreas':
// https://www.camp-firefox.de/forum/viewtopic.php?f=16&t=112673&start=2010#p1099758
//
// Feature: search glass is always visible at search bars end (like with old search)
// Feature: search button shows current search engines icon (like with old search)
// Feature: search buttons dropmarker is always visible (like with old search)
//
// Option: clear search input after search
// Option: revert to first search engine in list after search
// Option: old search engine selection popup ([!] FIREFOX 64+ only [!])
// Option: hide 'add engines' '+' indicator
// Option: hide 'oneoff' search engines (engines at popups bottom)
// Option: hide placeholder text 'Search'
// Option: swap the icons of search engine button and go button
// Option: show search engine names instead of icons only
// Option: select search engine by scrolling mouse wheel over search bars button
// Option: hide popup when using 'CTRL or MOUSE WHEEL + UP&DOWN keys' to switch engine
//
// [!] Option 'old search engine selection popup': the menuitem to add new new search engine is not present!
// Use menuitem inside default popup instead.
// [!] Default browser feature: if search bar is focused with 'CTRL + K' or 'CTRL + E', one can switch
// through search engines with 'CTRL + UP&DOWN keys' and 'CTRL + MOUSE WHEELs UP&DOWN scrolling'!
// [!] Default browser feature: search engine can be changed inside default/modern popup by right-clicking
// search icon and selecting 'Set As Default Search Engine' menuitem
// Configuration area - start
var clear_searchbar_after_search = true; // clear input after search (true) or not (false)
var revert_to_first_engine_after_search = true; // revert to first engine (true) or not (false)
var old_search_engine_selection_popup_fx64 = true; // show old search engine selection popup (true) or not (false)
var select_engine_by_scrolling_over_button = true; // select search engine by scrolling mouse wheel over search bars button (true) or not (false)
var hide_oneoff_search_engines = false; // hide 'one off' search engines (true) or not (false)
var hide_addengines_plus_indicator = true; // hide add engines '+' sign (true) or not (false)
var hide_placeholder = true; // hide placeholder (true) or not (false)
var switch_glass_and_engine_icon = true; // swap icons of search engine button and go button (true) or not (false)
var show_search_engine_names = true; // show search engine names (true) or not (false)
var show_search_engine_names_with_scrollbar = true; // show search engine names with scrollbars (true) or not (false)
var show_search_engine_names_with_scrollbar_height = '170px'; // higher values show more search engines
var searchsettingslabel = "Search Settings";
var hide_popup_when_selecting_engine_with_hotkeys = true; // hide popup when using 'CTRL or MOUSE WHEEL + UP&DOWN keys' to switch engine (true) or not (false)
// Configuration area - end
// main code
setTimeout(function(){
try {
var searchbar = document.getElementById("searchbar");
var appversion = parseInt(Services.appinfo.version);
updateStyleSheet();
if(hide_placeholder)
hideSearchbarsPlaceholder();
if(select_engine_by_scrolling_over_button)
selectEngineByScrollingOverButton();
if(old_search_engine_selection_popup_fx64 && appversion >= 64)
createOldSelectionPopup();
// select search engine by scrolling mouse wheel over search bars button
function selectEngineByScrollingOverButton() {
searchbar.addEventListener("DOMMouseScroll", (event) => {
if (event.originalTarget.classList.contains("searchbar-search-button")) {
searchbar.selectEngine(event, event.detail > 0);
}
}, true);
};
// hide placeholder
function hideSearchbarsPlaceholder() {
searchbar.getElementsByClassName('searchbar-textbox')[0].removeAttribute("placeholder");
};
// old search selection popup
function createOldSelectionPopup() {
var engines = searchbar.engines;
// set new search engine
searchbar.setNewSearchEngine = function(index) {
searchbar.currentEngine = searchbar.engines[index];
};
// create search popup
if(appversion <= 62) searchbuttonpopup = document.createElement("menupopup");
else searchbuttonpopup = document.createXULElement("menupopup");
searchbuttonpopup.setAttribute("id", "searchbuttonpopup");
searchbuttonpopup.setAttribute("width", searchbar.firstChild.nextSibling.getBoundingClientRect().width - 6 );
searchbuttonpopup.setAttribute("position", "after_start");
for (var i = 0; i <= engines.length - 1; ++i) {
if(appversion <= 62) menuitem = document.createElement("menuitem");
else menuitem = document.createXULElement("menuitem");
var name = engines[i].name;
menuitem.setAttribute("label", name);
menuitem.setAttribute("class", "menuitem-iconic searchbar-engine-menuitem menuitem-with-favicon");
if (engines[i] == searchbar.currentEngine)
menuitem.setAttribute("selected", "true");
if (engines[i].iconURI)
searchbar.setIcon(menuitem, engines[i].iconURI.spec);
menuitem.setAttribute("oncommand", "document.getElementById('searchbar').setNewSearchEngine("+i+")");
searchbuttonpopup.appendChild(menuitem);
}
if(appversion <= 62) menuseparator_om = document.createElement("menuseparator");
else menuseparator_om = document.createXULElement("menuseparator");
searchbuttonpopup.appendChild(menuseparator_om);
if(appversion <= 62) menuitem_om = document.createElement("menuitem");
else menuitem_om = document.createXULElement("menuitem");
menuitem_om.setAttribute("label", searchsettingslabel);
menuitem_om.setAttribute("class", "open-engine-manager");
menuitem_om.setAttribute("oncommand", "openPreferences('search');");
searchbuttonpopup.appendChild(menuitem_om);
document.getElementById("mainPopupSet").appendChild(searchbuttonpopup);
/* adjust popup width*/
setTimeout(function(){
document.getElementById('searchbuttonpopup').setAttribute("width", document.getElementById("searchbar").firstChild.nextSibling.getBoundingClientRect().width);
},1000);
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
try {
document.getElementById('searchbuttonpopup').setAttribute("width", document.getElementById("searchbar").firstChild.nextSibling.getBoundingClientRect().width );
} catch(e){}
});
});
try {
observer.observe(document.getElementById('search-container'), { attributes: true, attributeFilter: ['width'] });
} catch(e){}
var observer2 = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
try {
document.getElementById('searchbuttonpopup').setAttribute("width", document.getElementById("searchbar").firstChild.nextSibling.getBoundingClientRect().width );
} catch(e){}
});
});
try {
observer2.observe(document.getElementById('main-window'), { attributes: true, attributeFilter: ['sizemode'] });
} catch(e){}
// attach new popup to search bars search button
document.getAnonymousElementByAttribute(searchbar.firstChild.nextSibling, "class", "searchbar-search-button").setAttribute("popup", "searchbuttonpopup");
// hide default popup when clicking on search button
searchbar.addEventListener("mousedown", (event) => {
if (event.originalTarget.classList.contains("searchbar-search-button")) {
document.getElementById('PopupSearchAutoComplete').hidePopup();
document.getElementById("PopupSearchAutoComplete").style.visibility="collapse";
setTimeout(function() {
document.getElementById("PopupSearchAutoComplete").style.visibility="visible";
document.getElementById('PopupSearchAutoComplete').hidePopup();
}, 1000);
}
}, true);
};
// doSearch function taken from Firefox 60s internal 'searchbar.xml' file and added modifications
if(appversion < 63) searchbar.doSearch = function(aData, aWhere, aEngine) {
var textBox = this._textbox;
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");
let params = {
postData: submission.postData,
inBackground: aWhere == "tab-background"
};
openUILinkIn(submission.uri.spec,aWhere == "tab-background" ? "tab" : aWhere,params);
if(clear_searchbar_after_search)
this.value = '';
if(revert_to_first_engine_after_search) {
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
updateStyleSheet();
}
};
// doSearch function taken from Firefox 64s internal 'searchbar.js' file and added modifications
if(appversion >= 63) searchbar.doSearch = function(aData, aWhere, aEngine, aParams, aOneOff) {
let textBox = this._textbox;
if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && this.FormHistory.enabled) {
this.FormHistory.update({
op: "bump",
fieldname: textBox.getAttribute("autocompletesearchparam"),
value: aData,
}, {
handleError(aError) {
Cu.reportError("Saving search to form history failed: " + aError.message);
},
});
}
let engine = aEngine || this.currentEngine;
let submission = engine.getSubmission(aData, null, "searchbar");
let telemetrySearchDetails = this.telemetrySearchDetails;
this.telemetrySearchDetails = null;
if (telemetrySearchDetails && telemetrySearchDetails.index == -1) {
telemetrySearchDetails = null;
}
const details = {
isOneOff: aOneOff,
isSuggestion: (!aOneOff && telemetrySearchDetails),
selection: telemetrySearchDetails,
};
BrowserSearch.recordSearchInTelemetry(engine, "searchbar", details);
let params = {
postData: submission.postData,
};
if (aParams) {
for (let key in aParams) {
params[key] = aParams[key];
}
}
openTrustedLinkIn(submission.uri.spec, aWhere, params);
if(clear_searchbar_after_search)
this.value = '';
if(revert_to_first_engine_after_search) {
this.currentEngine = this.engines ? this.engines[0] : this._engines[0];
updateStyleSheet();
}
};
// setIcon function taken from browsers internal 'searchbar.js' file and added modifications
searchbar.setIcon = function(element, uri) {
element.setAttribute("src", uri);
updateStyleSheet();
};
// override selectEngine function and remove automatic popup opening
if(hide_popup_when_selecting_engine_with_hotkeys) searchbar.selectEngine = function(aEvent, isNextEngine) {
// Find the new index
let 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();
};
// main style sheet
function updateStyleSheet() {
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
var hide_oneoff_search_engines_code = '';
var show_search_engine_names_code = '';
var show_search_engine_names_with_scrollbar_code = '';
var hide_addengines_plus_indicator_code = '';
var switch_glass_and_engine_icon_code = '';
if(hide_oneoff_search_engines)
hide_oneoff_search_engines_code=' \
#PopupSearchAutoComplete .search-panel-header, \
#PopupSearchAutoComplete .search-one-offs { \
display: none !important; \
} \
';
if(hide_addengines_plus_indicator)
hide_addengines_plus_indicator_code=' \
.searchbar-search-button[addengines=true]::after { \
visibility: hidden !important; \
} \
';
if(show_search_engine_names && !hide_oneoff_search_engines && appversion < 66)
show_search_engine_names_code=' \
#PopupSearchAutoComplete .search-panel-tree:not([collapsed="true"]) { \
display: block !important; \
width: 100% !important; \
} \
#PopupSearchAutoComplete .search-panel-tree:not([collapsed="true"]) > * { \
width: 100%; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item { \
-moz-appearance:none !important; \
min-width: 0 !important; \
width: 100% !important; \
border: unset !important; \
height: 22px !important; \
background-image: unset !important; \
-moz-padding-start: 3px !important; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item:not([tooltiptext]) { \
display: none !important; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item .button-box { \
position: absolute !important; \
-moz-padding-start: 4px !important; \
margin-top: 3px !important; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item::after { \
-moz-appearance: none !important; \
display: inline !important; \
content: attr(tooltiptext) !important; \
position: relative !important; \
top: -9px !important; \
-moz-padding-start: 25px !important; \
min-width: 0 !important; \
width: 100% !important; \
white-space: nowrap !important; \
} \
';
if(show_search_engine_names && !hide_oneoff_search_engines && appversion >= 66)
show_search_engine_names_code=' \
#PopupSearchAutoComplete .search-panel-tree:not([collapsed="true"]) { \
display: block !important; \
width: 100% !important; \
} \
#PopupSearchAutoComplete .search-panel-tree:not([collapsed="true"]) > * { \
width: 100%; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item { \
-moz-appearance:none !important; \
min-width: 0 !important; \
width: 100% !important; \
border: unset !important; \
height: 22px !important; \
background-image: unset !important; \
-moz-padding-start: 3px !important; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item:not([tooltiptext]) { \
display: none !important; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item .button-box { \
position: absolute !important; \
-moz-padding-start: 4px !important; \
margin-top: 3px !important; \
} \
#PopupSearchAutoComplete .search-panel-one-offs .searchbar-engine-one-off-item::after { \
-moz-appearance: none !important; \
display: inline !important; \
content: attr(tooltiptext) !important; \
position: relative !important; \
top: -9px !important; \
-moz-padding-start: 25px !important; \
min-width: 0 !important; \
width: 100% !important; \
white-space: nowrap !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="21"] { \
min-height: 21px !important; \
height: 21px !important; \
max-height: 21px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="42"] { \
min-height: 42px !important; \
height: 42px !important; \
max-height: 42px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="63"] { \
min-height: 63px !important; \
height: 63px !important; \
max-height: 63px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="84"] { \
min-height: 84px !important; \
height: 84px !important; \
max-height: 84px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="105"] { \
min-height: 105px !important; \
height: 105px !important; \
max-height: 105px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="126"] { \
min-height: 126px !important; \
height: 126px !important; \
max-height: 126px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="147"] { \
min-height: 147px !important; \
height: 147px !important; \
max-height: 147px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="168"] { \
min-height: 168px !important; \
height: 168px !important; \
max-height: 168px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="189"] { \
min-height: 189px !important; \
height: 189px !important; \
max-height: 189px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree[height="210"] { \
min-height: 210px !important; \
height: 210px !important; \
max-height: 210px !important; \
} \
#PopupSearchAutoComplete .search-panel-tree scrollbar { \
display: none !important; \
visibility: collapse !important; \
opacity: 0 !important; \
} \
';
if(show_search_engine_names_with_scrollbar && !hide_oneoff_search_engines && show_search_engine_names)
show_search_engine_names_with_scrollbar_code=' \
#PopupSearchAutoComplete .search-one-offs { \
height: '+show_search_engine_names_with_scrollbar_height+' !important; \
max-height: '+show_search_engine_names_with_scrollbar_height+' !important; \
overflow-y: scroll !important; \
overflow-x: hidden !important; \
} \
\
';
if(switch_glass_and_engine_icon)
switch_glass_and_engine_icon_code=' \
.search-go-button { \
list-style-image: url('+document.getElementById("searchbar").currentEngine.iconURI.spec+') !important; \
transform: scaleX(1) !important; \
} \
.searchbar-search-button .searchbar-search-icon { \
list-style-image: url(chrome://browser/skin/search-glass.svg) !important; \
-moz-context-properties: fill, fill-opacity !important; \
fill-opacity: 1.0 !important; \
fill: #3683ba !important; \
} \
.searchbar-search-button:hover .searchbar-search-icon { \
fill: #1d518c !important; \
} \
.searchbar-search-button:active .searchbar-search-icon { \
fill: #00095d !important; \
} \
\
';
var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(' \
\
#searchbuttonpopup {\
-moz-margin-start: -1px; \
} \
.searchbar-search-button .searchbar-search-icon { \
list-style-image: url('+document.getElementById("searchbar").currentEngine.iconURI.spec+') !important; \
} \
.search-go-button { \
list-style-image: url(chrome://browser/skin/search-glass.svg) !important; \
-moz-context-properties: fill, fill-opacity !important; \
fill-opacity: 1.0 !important; \
fill: #3683ba !important; \
transform: scaleX(-1) !important; \
background: unset !important; \
margin-inline-end: 4px !important; \
} \
.search-go-button:hover { \
fill: #1d518c !important; \
} \
.search-go-button:active { \
fill: #00095d !important; \
} \
.search-go-button[hidden="true"] { \
display: block !important; \
} \
.searchbar-search-button[addengines=true] > .searchbar-search-icon-overlay, \
.searchbar-search-button:not([addengines=true]) > .searchbar-search-icon-overlay { \
list-style-image: url(chrome://global/skin/icons/arrow-dropdown-12.svg) !important; \
-moz-context-properties: fill !important; \
margin-inline-start: -6px !important; \
margin-inline-end: 2px !important; \
width: 11px !important; \
height: 11px !important; \
} \
.searchbar-search-button[addengines=true] > .searchbar-search-icon-overlay { \
margin-top: 0px !important; \
} \
.searchbar-search-button[addengines=true]::after { \
content: " " !important; \
background: url(chrome://browser/skin/search-indicator-badge-add.svg) center no-repeat !important; \
display: block !important; \
visibility: visible !important; \
width: 11px !important; \
height: 11px !important; \
-moz-margin-start: 18px !important; \
margin-top: -11px !important; \
position: absolute !important; \
} \
.searchbar-search-button[addengines=true] > .searchbar-search-icon-overlay { \
visibility: visible !important; \
} \
'+hide_addengines_plus_indicator_code+' \
'+hide_oneoff_search_engines_code+' \
'+show_search_engine_names_code+' \
'+show_search_engine_names_with_scrollbar_code+' \
'+switch_glass_and_engine_icon_code+' \
\
'), null, null);
// remove old style sheet
if (sss.sheetRegistered(uri,sss.AGENT_SHEET)) {
sss.unregisterSheet(uri,sss.AGENT_SHEET);
}
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
};
} catch(e) {}
},1000);
Alles anzeigen
Teste den Code aus 95
Teste den Code aus 95
Danke Boersenfeger. In einem andere Profil klapt es jetzt. Aber nicht allein mit dem Code aus Beitrag #95, denn der gestaltet das Suchfeld nicht. Damit klappt nur das automatische Leeren des Suchfelds.
Die Suchleiste sieht hier so aus, mehr benötige ich nicht...
[attachment=0]Suche.JPG[/attachment]
Mit dem Abschicken der Suche wird ein neuer Tab geöffnet und das Suchfeld wird geleert. Wenn die Suche nicht gestartet wird, wird das Suchfeld nach 5 Sekunden ebenfalls geleert..