Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*FirefoxLocalAddonSearch (run from browser console only)*/
- ((a, b) => {
- if ((a = document.querySelector(".main-search")) && !window.asb) {
- (b = a.insertBefore(document.createElement("INPUT"), a.firstChild)).id = "asb";
- b.style.cssText = "position:absolute;left:2em";
- b.oninput = i => {
- i = b.value.trim().toUpperCase();
- document.querySelectorAll("addon-card").forEach((ca, l) => {
- if (l = ca.querySelector(".addon-name-link")) {
- ca.style.display = i && l.title.toUpperCase().includes(i) ? "" : "none";
- }
- })
- };
- addEventListener("keydown", ev => {
- if ((ev.key === "f") && ev.ctrlKey && !ev.shiftKey && !ev.altKey) {
- ev.preventDefault();
- ev.stopPropagation();
- ev.stopImmediatePropagation();
- asb.focus()
- }
- }, true)
- }
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement