hartumov пишетВ консоли две ошибки
Ого! Не думал что такое (пока) встречается "в дикой природе".
Значит CB установлен на релиз или бету вылеченную не через config.js,
либо на билд изначально не нуждающийся в лечении (DE, Unbraindead, ...)
и без config.js как такового.
Да, я ставил CB через правку omni.ja
Если MDN-страница eval недостаточно запугала, то можно переключить
настройку security.allow_eval_with_system_principal
Переключил. eval заработал. Ну посмотрим как оно что будет. Спасибо за помощь!
Отсутствует
Dumby
В мульти крякнула кнопка "добавить закладку"...Короче, окно это падает. Не, сам не справлюсь...уж больно крутая кнопка. Если бы не аддоны ( без мульти - не настроишь многие), короче, кроме жора памяти никаких плюшек не вижу....
((popup, {lastChild} = popup, pref = "CB.bookmarkFolderGuidForSaving") => addDestructor(reason => reason == "delete" && Services.prefs.clearUserPref(pref)) + addEventListener("popupshowing", { index: 0, // 0 - первой, PlacesUtils.bookmarks.DEFAULT_INDEX - последней width: 500, height: 640, nodePosition: .35, handleEvent(e) { if (e.target != popup || this.shouldHide()) return; var menuitem = document.createElementNS(xulns, "menuitem"); menuitem.id = "context-addBookmark"; menuitem.className = "menuitem-iconic"; menuitem.setAttribute("image", "data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQKPK/0Cjyv9Ao8r/QKPK/0Cjyv9Ao8r/QKPK/0Cjyv9Ao8r/QKPK/0Cjyv9nn8T/Z57E22edw3IAAAAAAAAAAESmzP+Q5/b/h+T0/4Dh8/983/L/eN3x/3Xb8P902vD/dtvw/3nc8P9Epsz/Vczq/1jG5f9nnsTbAAAAAAAAAABJqc7/j+j2/4bl9f9/4fP/ed7y/3Xc8f9y3PD/cdrw/3La8P932/D/SanO/1vP6//TpUn/Zp/E/wAAAAAAAAAATqzR/5Dp9v+H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AAAwAAAAMAAAABAAAAAQAAAAAAAAABAAAAAQAAAAcAAA=="); menuitem.setAttribute("oncommand", "linkedObject.oncommand(event);"); menuitem.linkedObject = this; menuitem.onauxclick = e => { if (e.button == 1) return; e.preventDefault(); popup.hidePopup(); this.pick(); } lastChild.after(menuitem); addDestructor(() => menuitem.remove()); (this.handleEvent = e => e.target == popup && !(menuitem.hidden = this.shouldHide()) && this.update(menuitem) )(e); }, ons: ["isContentSelected", "onTextInput", "onImage", "onVideo", "onCanvas", "onAudio"], shouldHide() { if (gContextMenu.onLink) return false; return this.ons.some(on => gContextMenu[on]); }, oncommand(e) { this[e.ctrlKey || e.shiftKey ? "pick" : "bookmark"](e.target); }, get guid() { return Services.prefs.getStringPref(pref, PlacesUtils.bookmarks.toolbarGuid); }, async update(menuitem) { var info = await PlacesUtils.bookmarks.fetch(this.guid); var title = PlacesUtils.bookmarks.getLocalizedTitle(info); menuitem.label = "Добавить закладку в: " + ( menuitem.folderName = title || "[без заголовка]" ); }, pick() { var features = "chrome,all,resizable,centerscreen,modal"; window.openDialog(this.url, "_blank", features, this.guid); }, bookmark({folderName}) { if (gContextMenu.onLink) { var url = gContextMenu.linkURL; var title = gContextMenu.linkText(); } else { var url = gBrowser.currentURI.spec; var title = gBrowser.contentTitle || gBrowser.selectedTab.label; } var info = {url, title, parentGuid: this.guid, index: this.index}; PlacesUtils.bookmarks.insert(info).then( () => this.notify(title, "Добавил закладку в папку: " + folderName), err => this.notify("Ошибка", err) ); }, get as() { delete this.as; return this.as = Cc["@mozilla.org/alerts-service;1"] .getService(Ci.nsIAlertsService); }, notify(title, msg) { this.as.showAlertNotification("chrome://global/skin/icons/cpd_OK.png", title, msg); setTimeout(this.as.closeAlert, 1800); }, get url() { var xul = `<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="chrome://browser/content/places/places.css"?> <?xml-stylesheet href="chrome://browser/skin/places/places.css"?> <?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css"?> <dialog xmlns="${xulns}" id="bookmark-folder-saver-dialog" windowtype="bookmark-folder-saver:dialog" title="Выберите папку" buttons="accept,cancel" onload="init();" width="${this.width}" height="${this.width}"> <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/> <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/> <script type="application/javascript"><![CDATA[ ChromeUtils.defineModuleGetter(window, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.defineModuleGetter(window, "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm"); ChromeUtils.defineModuleGetter(window, "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView", "chrome://browser/content/places/treeView.js"); XPCOMUtils.defineLazyScriptGetter( window, ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],\n\ "chrome://browser/content/places/controller.js"\n\ ); ]]></script> <script type="application/javascript" src="chrome://browser/content/places/places-tree.js"/> <tree id="tree" type="places" is="places-tree" place="place:type=${ Ci.nsINavHistoryQueryOptions.RESULTS_AS_ROOTS_QUERY }&excludeItems=1&excludeQueries=1" hidecolumnpicker="true" seltype="single" flex="1"> <treecols> <treecol id="title" flex="1" primary="true" hideheader="true" /> </treecols> <treechildren /> </tree> <script type="application/javascript"><![CDATA[ var tree = document.getElementById("tree"); function init() { tree.selectItems([window.arguments[0]]); var ind = tree.view.selection.currentIndex; ind != -1 && setTimeout(() => { if ("nsITreeBoxObject" in Ci) { var tbo = tree.treeBoxObject; var visibleRows = tbo.height/tbo.rowHeight; } else { var tbo = tree; var visibleRows = tbo.getPageLength(); } var cur = tbo.view.selection.currentIndex; var first = tbo.getFirstVisibleRow(); var newFirst = cur - ${this.nodePosition}*visibleRows + 1; tbo.scrollByLines(Math.round(newFirst - first)); }, 0); var onKeydown = e => e.ctrlKey && e.key == "Enter" && !e.shiftKey && document.documentElement.acceptDialog(e.stopPropagation()); addEventListener("keydown", onKeydown, true); addEventListener("dialogaccept", dialogCallback); window.onunload = () => { removeEventListener("keydown", onKeydown, true); removeEventListener("dialogaccept", dialogCallback); } } function dialogCallback() { var ind = tree.view.selection.currentIndex; if (ind == -1) return; var item = tree.view.nodeForTreeIndex(ind); item && Services.prefs.setStringPref( "${pref}", PlacesUtils.getConcreteItemGuid(item) ); } ]]></script> </dialog>`; var url = URL.createObjectURL(new Blob( [xul], {type: "application/xhtml+xml"} )); addDestructor(() => URL.revokeObjectURL(url)); delete this.url; return this.url = url; } }, false, popup || 1))(document.getElementById("contentAreaContextMenu"));
var url = URL.createObjectURL(new Blob ???
Отредактировано ВВП (22-03-2021 18:15:39)
Отсутствует
В мульти крякнула
Ага. Год назад.
/* var url = URL.createObjectURL(new Blob( [xul], {type: "application/xhtml+xml"} )); addDestructor(() => URL.revokeObjectURL(url)); */ var version = parseInt(Services.appinfo.platformVersion); var url, type = `application/${version >= 73 ? "xhtm" : "vnd.mozilla.xu"}l+xml`; if (version >= 69 && Services.appinfo.browserTabsRemoteAutostart) { url = `chrome://custombuttons/content/cbfolderpicker${Date.now()}.xul`; var ams = Cc["@mozilla.org/addons/addon-manager-startup;1"].getService(Ci.amIAddonManagerStartup); this.helper = ams.registerChrome( Services.io.newFileURI(Services.dirsvc.get("ProfD", Ci.nsIFile)), [["override", url, `data:${type},${encodeURIComponent(xul)}`]] ); addDestructor(this.helper.destruct); } else { url = URL.createObjectURL(new Blob([xul], {type})); addDestructor(() => URL.revokeObjectURL(url)); }
Отсутствует
Dumby
Черт знает, но браузер в ступоре после нажатия ...Огласите низ кода до упора?
Не надо, справился...Благодарю.
Код memory , в 77 версии вместо цифр крозебяки...?
// (async id => ({ delay: 2e3, get limit() { var mb = 950 * 950; delete this.limit; return this.limit = this.notMulti ? 900 * mb // not multiprocess, 900MB : 1.1 * 950 * mb; // multiprocess, 1.1GB }, xul: ` <hbox id="${id}" value="ram" tooltiptext="ЛКМ: Очистить Память" > <label id="${id += "-label"}"/> </hbox> `, css: ` min-height: 23px !important; height: 23px !important; border-radius: 3px !important; padding: 0px 5px 0px !important; font-family: segoe ui !important; color: #00ffff !important; font-size: 15px !important; margin-bottom: 2px !important; margin-right: 1px !important; margin-left: 3px !important; background: linear-gradient(rgb(72, 85, 108),rgb(20, 25, 34)) !important; `, launch() { var file = Services.dirsvc.get("ProfD", Ci.nsIFile); ["memred", "start.vbs"].forEach(file.append); (this.launch = file.launch)(); }, val: "", init(topic, mm) { Services.obs.addObserver(mm = this, topic); Services.obs.addObserver(function quit(s, t) { this.timer?.cancel(); Services.obs.removeObserver(mm, topic); Services.obs.removeObserver(quit, t); }, "quit-application-granted"); }, observe(win) { var df = win.MozXULElement.parseXULToFragment(this.xul); this.click = e => e.button || this.launch(); this.notMulti = !Services.appinfo.browserTabsRemoteAutostart; this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); (this.observe = async win => { this.timer.cancel(); await new Promise(win.requestAnimationFrame); var clone = win.document.importNode(df, true); var hbox = clone.firstChild; win.document.getElementById("page-action-buttons").append(clone); hbox.onclick = this.click; hbox.style.cssText = this.css; hbox.firstChild.style.setProperty("margin", "0", "important"); this.notify(); })(win); }, async notify() { var info = await ChromeUtils.requestProcInfo(); var bytes = info.residentSetSize; for(var child of info.children) bytes += child.residentUniqueSize; this.timer.initWithCallback(this, this.delay, this.timer.TYPE_ONE_SHOT); var prev = this.val; if ((this.val = this.mgb(bytes)) != prev) for(var win of CustomizableUI.windows) win.document.getElementById(id).value = this.val; //this.notMulti && bytes > this.limit && this.launch(); }, mgb: bytes => bytes < 1073741824 ? String(Math.round(bytes / 1048576)) : (bytes / 1073741824).toFixed(2) }).init("browser-delayed-startup-finished"))("ucf-mem-indicator");
Вот еще, ссылки кликабельны , а на постоянке нельзя?
gBrowser.selectedBrowser.messageManager.loadFrameScript(this.fsURL || ( this.fsURL = `data:,(match => {\n${encodeURIComponent(this.Help)}\n})()` ), false);
Отредактировано ВВП (23-03-2021 19:46:49)
Отсутствует
Dumby - можете добавить Tooltip-подсказки для пунктов меню QuickToggleSettings ?
Это нужно, чтобы после значений ключа и опций в подсказке для пункта меню было ещё и краткое описание.
Ещё правый клик на МакОС не работал, я исправил, но не полностью... var lin = e.view.AppConstants.platform == "macosx";
// Quick Toggle https://forum.mozilla-russia.org/viewtopic.php?pid=784139#p784139 // https://forum.mozilla-russia.org/viewtopic.php?pid=784165#p784165 // Быстрое переключение параметров about:config // LongClick не срабатывает второй раз, сначала нужно открыть меню (async (name, id, func) => { if (name == "Object") return CustomizableUI.createWidget(func()); var win = name == "Window", g = Components.utils.import("resource://gre/modules/Services.jsm", {}); if (g[id]) {if (win) return;} else g[id] = func(); if (win) return CustomizableUI.createWidget(g[id]); addDestructor(r => r[5] == "e" && delete g[id]); g[id].onCreated(this); })(this.constructor.name, "QuickToggleAboutConfigSettingsUCF", () => { var {prefs} = Services, db = prefs.getDefaultBranch(""); var pv = parseInt(Services.appinfo.platformVersion); var xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; //===================================================================================== // refresh: // false - reload current tab // true - reload current tab skip cache // // restart: // false - restart browser // true - restart browser with confirm var primary = [{ pref: ["network.proxy.autoconfig_url", "Прокси (VPN) URL"], userChoice: 0, userAlt: 1, refresh: true, values: [ ["127.0.0.1", "отключен…", "0"], ["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Надёжный доступ на заблокированные сайты\n\nУстановите «Настройки прокси» = 2"], [prefs.getStringPref("user.pacfile", "file:///etc/proxy.pac"), "user .pac файл", "2"], ["https://git.io/ac-anticensority-pac", "ac-anticensority", "3"], ["localhost", "Tor Browser", "4"] ]},{ pref: ["network.proxy.type", "Режим прокси"], userChoice: 0, userAlt: 2, refresh: true, values: [ [0, "Без прокси", "0", "по-умолчанию"], [5, "Системные (из IE)", "5"], [2, "URL автонастройки", "2", "about:config — user.pacfile"], [1, "Ручная настройка", "1", "вторая строка"], [4, "Автоопределение", "4"] ]},{ pref: ["network.proxy.share_proxy_settings", "Прокси для всех протоколов"], userChoice: true, refresh: true, values: [[true, "Да", "", "Прокси для всех протоколов при ручной настройке"], [false, "Нет"]] },{ pref: ["network.trr.mode", "DNS через HTTPS"], userChoice: 2, userAlt: 0, refresh: true, values: [ [0, "Выключен", "0"], [2, "TRR + мой", "2"], [3, "только TRR", "3"] ]},null,{ pref: ["permissions.default.image", "Разрешить загрузку изображений"], userChoice: 1, userAlt: 3, refresh: true, values: [[1, "Да"], [3, "Только с сайта"], [2, "Нет"]] },{ pref: ["image.animation_mode", "Анимация изображений"], userChoice: "none", refresh: true, values: [["none", "Выключена"], ["normal", "Включена"], ["once", "Единожды"]] },{ pref: ["browser.display.use_document_fonts", "Загружать web-шрифты"], userChoice: 1, refresh: true, values: [[1, "Да"], [0, "Нет"]] },null,{ pref: ["media.autoplay.default", "Авто-play аудио/видео"], userChoice: 5, refresh: true, values: [ [0, "Разрешить", "0"], [1, "Запретить", "1"], [2, "Спрашивать", "2"], [5, "Блокировать", "5"] ]},{ pref: ["media.autoplay.blocking_policy", "Автозапуск (политика)"], userChoice: 1, userAlt: 2, refresh: true, values: [ [1, "Временная", "1"], [2, "По действию", "2"], [0, "Постоянная", "0"] ]},{ pref: ["plugin.state.flash", "Flash-plugin"], userChoice: 2, refresh: true, values: [ [2, "Всегда включать", "2"], [1, "Включать по запросу", "1"], [0, "Никогда не включать", "0"] ]},null,{ pref: ["network.cookie.cookieBehavior", "Cookies"], userChoice: 1, userAlt: 3, refresh: false, values: [ [1, "Не принимать сторонние"], [3, "Не принимать с не посещенных"], [4, "Не принимать от трекеров"], [2, "Не принимать со всех"], [0, "Принимать со всех"] ]},{ pref: ["javascript.enabled", "Выполнять скрипты Java"], userChoice: true, refresh: true, values: [[true, "Да"], [false, "Нет"]] },null,{ pref: ["dom.storage.enabled", "Локальное хранилище"], userChoice: true } ]; //===================================================================================== var secondary = [{ pref: ["dom.enable_performance", "Статус загрузки страницы"], userChoice: false },{ pref: ["browser.display.document_color_use", "Использовать цвета сайтов"], userChoice: 0, values: [[0, "Авто", "0"], [1, "Всегда", "1"], [2, "Никогда", "2"]] },{ pref: ["intl.accept_languages", "Язык для веб-страниц"], userChoice: "ru-RU, ru, en-US, en", values: [["chrome://global/locale/intl.properties", "По-умолчанию"], ["en-US, en, ru-RU, ru", "Английская локаль"], ["ru-RU, ru, en-US, en", "Русская локаль"]] },null,{ pref: ["network.http.sendRefererHeader", "Referer - для чего"], userChoice: 1, values: [[0, "Ни для чего", "0"], [1, "Только ссылки", "1"], [2, "Ссылки и изобр.", "2"]] },{ pref: ["media.peerconnection.enabled", "WebRTC утечка IP"], userChoice: false },{ pref: ["gfx.webrender.all", "WebRender для всего"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] },{ pref: ["media.webm.enabled", "Декодер WebM VP8"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] } ]; return { label: "Quick Toggle Settings", id: "QuickToggleAboutConfigSettings", tooltiptext: "Quick Toggle Settings\n ЛКМ ПКМ", localized: false, image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFPSURBVDhPnVPNSsNAEJ5tamnBk+A7BMEcikohp/gi9i18nRafQoT00kK16tnn8CJo4vp9m5m41eSgH0zmd3d+diJ/gfdedvl0QW7k1PcLwem+3TjowZagK+Nn6yc3gNCJ+LCCh9LzzTMdqeoNbkQSFZmpJLGCW5Gx2hZaQahMbZ52VuDSfHpnAVJXOb4FKzianbzCXiLrHLYl5C3t5NTRwtxaKJxUTZ/JcOTr6q2Rxwf0aVb2/hLs4KqL3Isckz/mmSdRRksjyg+z7IM6LzDCBfuvAEOJmIKBOqAWmo1YodxLlQNsyO0rsIV/AZM+JGc2a4GgzhZ2p9mFmrpboCMqNYBDdMlwompoTWN6F2nFT5hBXb0PEpmo/Gk+oH+RrqNZINPeIlnZViV1jQuLFJQuWGB0gJdwgShvqdPXZv6J+F/QS7oXqQ9xBTFZ5oa8fAGs9fed5YhPSwAAAABJRU5ErkJggg==", onCreated(btn) { btn.setAttribute("image", this.image); var doc = btn.ownerDocument; btn.btn = true; btn.domParent = null; btn.popups = new btn.ownerGlobal.Array(); this.createPopup(doc, btn, "primary", primary); this.createPopup(doc, btn, "secondary", secondary); this.createCloseMenusOption(doc, btn); btn.linkedObject = this; for(var type of ["command", "contextmenu", "mousedown"]) btn.setAttribute("on" + type, `linkedObject.${type}(event)`); }, createPopup(doc, btn, name, data) { var popup = doc.createElementNS(xul_ns, "menupopup"); var prop = name + "Popup"; btn.popups.push(btn[prop] = popup); popup.id = this.id + "-" + prop; for (var type of ["popupshowing", "click"]) popup.setAttribute("on" + type, `parentNode.linkedObject.${type}(event)`); for(var obj of data) popup.append(this.createElement(doc, obj)); btn.append(popup); }, map: {b: "Bool", n: "Int", s: "String"}, createElement(doc, obj) { if (!obj) return doc.createElementNS(xul_ns, "menuseparator"); var pref = doc.ownerGlobal.Object.create(null), node, img, bool; for(var [key, val] of Object.entries(obj)) { if (key == "pref") { var [apref, lab, akey, ttt] = val; pref.pref = apref; pref.lab = lab || apref; if (ttt) pref.ttt = ttt; } else if (key == "image") img = val, pref.img = true; else if (key != "values") pref[key] = val; else pref.hasVals = true; } var type = prefs.getPrefType(pref.pref); var str = this.map[type == prefs.PREF_INVALID ? obj.values ? (typeof obj.values[0][0])[0] : "b" : type == prefs.PREF_BOOL ? "b" : type == prefs.PREF_INT ? "n" : "s" ]; pref.get = prefs[`get${str}Pref`]; pref.set = prefs[`set${str}Pref`]; node = doc.createElementNS(xul_ns, "menu"); node.className = "menu-iconic"; node.setAttribute("closemenu", "none"); img && node.setAttribute("image", img); akey && node.setAttribute("accesskey", akey); (node.pref = pref).vals = doc.ownerGlobal.Object.create(null); this.createRadios(doc, str.startsWith("B") && !pref.hasVals ? [[true, "true"], [false, "false"]] : obj.values, node.appendChild(doc.createElementNS(xul_ns, "menupopup")) ); if ("userChoice" in obj) pref.noAlt = !("userAlt" in obj); return node; }, createCloseMenusOption(doc, btn) { var pn = this.closePref = "QuickToggleAboutConfigSettings.closeMenus"; var data = [null, { pref: [pn, "Закрывать меню этой кнопки"], values: [[true, "Да"], [false, "Нет"]] }]; var setCloseMenus = e => { e.stopPropagation(); var trg = e.target, {pref, val} = trg, updPopup = true, clear; switch(e.type) { case "command": pref = (trg = trg.closest("menu")).pref; updPopup = false; break; case "click": if (e.button) return; break; case "contextmenu": e.preventDefault(); clear = pref; } if (!pref) return; if (clear) prefs.clearUserPref(pn); else if (!updPopup && val === pref.val) return; else pref.set(pn, val !== undefined ? val : !pref.val); this.upd(trg); updPopup && this.popupshowing(null, trg.querySelector("menupopup")); } (this.createCloseMenusOption = (doc, btn) => { for(var obj of data) btn.secondaryPopup.append(this.createElement(doc, obj)); var m = btn.secondaryPopup.lastChild; m.style.cssText = "fill: lightblue !important; list-style-image: url(chrome://browser/skin/menu.svg) !important;"; m.setAttribute("oncommand", "setCloseMenus(event)"); m.onclick = m.oncontextmenu = m.setCloseMenus = setCloseMenus; })(doc, btn); }, UserChoiceImg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRUlEQVR42qWTS2gTQRjH/zPJZo2BDfgkB62vYg5CjQdvRUE8WB8HKyahYotIQQOeFKGCF7EgvQlBqOCjWFKlevBRDyL4uHloLXhYqWJroaEqlETSptndGb+ZPDH0ojN8O8vA98vv+/Itw38u1nSRYRE6UhKyg4FF1R292/Q+xhhLi4TIrgjgIzwe4MbgmR2nrZMtxxEN63zYORuPZp7gzpehvCu9XjfuPmwCUHIiEtw4fK89zVvD2+FHAD56quXBpV3CVO4ret6nxHzxZxdBRuqADCKmz7RHD9y2tlmbYbBVfwE8DXBkEd/y39H5+mze8ZyoSIpsFXC9u/VE3/ldpyg5AAMEoJMTQi2hANKBgyKdy0h/eoChqcf9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ORK5CYII=", upd(node) { var {pref} = node, def = false, user = false, val; if (prefs.getPrefType(pref.pref) != prefs.PREF_INVALID) { var pn = pref.pref; try {val = pref.defVal = db[pref.get.name](pn); def = true} catch(ex) {def = false;} var user = prefs.prefHasUserValue(pn); if (user) try {val = pref.get(pn, undefined);} catch(ex) {} } if (val == pref.val && def == pref.def && user == pref.user) return; pref.val = val; pref.def = def; pref.user = user; var exists = def || user; var ttt = exists ? val : "Этого префа не существует"; if (ttt === "") ttt = "[ empty_string ]"; ttt += "\n" + pref.pref; if (pref.ttt) ttt += "\n" + pref.ttt; node.tooltipText = ttt; var img, alt = "userAlt" in pref && val == pref.userAlt; if (alt) img = this.UserAltImg; if ("userChoice" in pref) if (val == pref.userChoice) //node.style.removeProperty("color"), img = this.UserChoiceImg; else { //node.style.setProperty("color", "maroon", "important"); if (!alt) img = this.notUserChoiceImg; } if (!pref.img) img ? node.setAttribute("image", img) : node.removeAttribute("image"); user ? node.style.setProperty("font-style", "italic", "important") : node.style.removeProperty("font-style"); var {lab} = pref; if (exists && pref.hasVals) { if (val in pref.vals) var sfx = pref.vals[val] || val; else var sfx = user ? "Другое" : "По умолчанию"; lab += ` — "${sfx}"`; } node.setAttribute("label", lab); }, createRadios(doc, vals, popup) { for(var arr of vals) { if (!arr) { popup.append(doc.createElementNS(xul_ns, "menuseparator")); continue; } var [val, lab, key, ttt] = arr; var menuitem = doc.createElementNS(xul_ns, "menuitem"); menuitem.setAttribute("type", "radio"); menuitem.setAttribute("closemenu", "none"); menuitem.style.setProperty("font-style", "italic", "important"), menuitem.setAttribute("label", popup.parentNode.pref.vals[val] = lab); key && menuitem.setAttribute("accesskey", key); var tip = menuitem.val = val; if (ttt) tip += "\n" + ttt; menuitem.tooltipText = tip; popup.append(menuitem); } }, openPopup(popup) { var btn = popup.parentNode; if (btn.domParent != btn.parentNode) { btn.domParent = btn.parentNode; var pos; if (btn.matches(".widget-overflow-list > :scope")) pos = "after_start"; else var win = btn.ownerGlobal, {width, height, top, bottom, left, right} = btn.closest("toolbar").getBoundingClientRect(), pos = width > height ? `${win.innerHeight - bottom > top ? "after" : "before"}_start` : `${win.innerWidth - right > left ? "end" : "start"}_before`; for(var p of btn.popups) p.setAttribute("position", pos); } popup.openPopup(btn); }, maybeRestart(node, conf) { var msgRest = "Перезапустить браузер?", msgAbort = "Запрос на выход отменен."; if (pv >= 77) { var title = node.closest("toolbarbutton").label; var pp = domWin => Services.prompt.wrappedJSObject.pickPrompter({ domWin, modalType: Ci.nsIPrompt.MODAL_TYPE_WINDOW }); var confirm = win => pp(win).confirm(title, msgRest); var alert = win => pp(win).alert(title, msgAbort); } else { var confirm = win => win.confirm(msgRest); var alert = win => win.alert(msgAbort); } return (this.mayBeRestart = (node, conf) => { var win = node.ownerGlobal; if (conf && !confirm(win)) return; if (win.BrowserUtils.restartApplication() === false) alert(win); else return true; })(node, conf); }, regexpRefresh: /^(?:view-source:)?(?:https?|ftp)/, maybeRe(node, fe) { var {pref} = node; if ("restart" in pref) { if (this.maybeRestart(node, pref.restart)) return; } else this.popupshowing(fe, node.parentNode); if ("refresh" in pref) { var win = node.ownerGlobal; if (this.regexpRefresh.test(win.gBrowser.currentURI.spec)) pref.refresh ? win.BrowserReloadSkipCache() : win.BrowserReload(); } }, maybeClosePopup(e, trg) { !e.ctrlKey && prefs.getBoolPref(this.closePref, undefined) && trg.parentNode.hidePopup(); }, command(e) { var trg = e.target; if (trg.btn) return this.openPopup(trg.primaryPopup); var menu = trg.closest("menu"), newVal = trg.val; this.maybeClosePopup(e, menu); if (newVal != menu.pref.val) menu.pref.set(menu.pref.pref, newVal), this.maybeRe(menu, true); }, popupshowing(e, trg = e.target) { if (trg.state == "closed") return; if (trg.id) { for(var node of trg.children) { if (node.nodeName.endsWith("r")) continue; this.upd(node); !e && node.open && this.popupshowing(null, node.querySelector("menupopup")); } return; } var {pref} = trg.closest("menu"), findChecked = true; var findDef = "defVal" in pref; var checked = trg.querySelector("[checked]"); if (checked) { if (checked.val == pref.val) { if (findDef) findChecked = false; else return; } else checked.removeAttribute("checked"); } if (findDef) { var def = trg.querySelector("menuitem:not([style*=font-style]"); if (def) if (def.val == pref.defVal) { if (findChecked) findDef = false; else return; } else def.style.setProperty("font-style", "italic", "important"); } for(var node of trg.children) if ("val" in node) { if (findChecked && node.val == pref.val) { node.setAttribute("checked", true); if (findDef) findChecked = false; else break; } if (findDef && node.val == pref.defVal) { node.style.removeProperty("font-style"); if (findChecked) findDef = false; else break; } } }, contextmenu(e) { var trg = e.target; if (trg.btn) { if (e.ctrlKey || e.shiftKey) return; if (e.detail == 2) return trg.secondaryPopup.hidePopup(); this.openPopup(trg.secondaryPopup); } else if ("pref" in trg && trg.pref.user) prefs.clearUserPref(trg.pref.pref), this.maybeRe(trg, true); e.preventDefault(); }, mousedown(e) { var reset = e => e.target.linkedObject = this; var id, lo = {command: reset, mousedown: reset}; var lin = e.view.AppConstants.platform == "macosx"; // linux win var stop = e => reset(e) && e.preventDefault(); lo.contextmenu = lin ? e => e.ctrlKey || e.shiftKey ? dsp(e) : stop(e) : stop; var context = lin ? e => e.button == 2 && e.type.endsWith("p") && this.contextmenu(e) : () => {}; var dsp = (e, timeout) => { var trg = e.target; trg.onmouseup = trg.onmouseleave = null; if (timeout) return this.londPress(e); e.view.clearTimeout(id); reset(e); context(e); } (this.mousedown = e => { var trg = e.target; if (!trg.btn) return; trg.linkedObject = lo; trg.onmouseup = trg.onmouseleave = dsp; id = e.view.setTimeout(dsp, 500, e, true); })(e); }, londPress(e) { // удержание кнопки мыши, выбирать команды, отводящие мышь от кнопки var msg = "QuickSettings\nLONG PRESS: e.button = " + e.button; Components.utils.reportError(msg); e.view.alert(msg); } }; });
Отредактировано Dobrov (23-03-2021 16:23:17)
Отсутствует
Dumby - нужно в QuickToggleSettings для элементов values: [ …] добавить ключ выполнения указанного имени функции. (аналог refresh: true)
Ведь если меняем proxy.autoconfig_url на "Антизапрет", то ещё требуется изменить network.proxy.type на "2" для нормальной работы.
Поэтому в элемент values [ …], переключающий proxy.autoconfig на "Антизапрет", нужно добавить выполнение указанной функции (или строки команд).
То есть, после подменю: proxy.autoconfig_url на "Антизапрет" нужно, чтобы этот пункт подменю запустил конкретную функцию или команду, которая поменяет network.proxy.type на "2".
Примерные варианты синтаксиса - ищем ключевое слово в массиве и после изменения параметра запускаем указанное имя функции, а только потом выполняем флаг refresh.
values: [
["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "TOOLTIP после ключевого слова - текст подсказки", "custombuttons.setPrefs("network.proxy.type", 2)"], нет ключевого слова TOOLTIP, значит выполнить эту строку как Java-код
["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Строки дополнительной подсказки", "RUN CheckProxy"],
["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Дополнительная подсказка", "JAVA custombuttons.setPrefs("network.proxy.type", 2)"], это прямо прописанная команда
["127.0.0.1", "отключен…", "0"], … …]
Логика работы: после установки параметра выполняем функцию CheckProxy, а только затем обновляем страницу (если refresh: true)
То есть под-пункт меню должен после установки about:config параметра выполнять функцию или строку команды, которая поменяет network.proxy.type на "2" или просто покажет всплывающую подсказку или ещё что-нибудь…
Dumby - это возможно сделать в коде кнопки QuickToggleSettings ?
Отредактировано Dobrov (24-03-2021 04:27:14)
Отсутствует
Код memory , в 77 версии вместо цифр крозебяки...?
NaN это не «крозебяки».
Уже было спрошено, и ответ был даден.
ссылки кликабельны , а на постоянке нельзя?
добавить Tooltip-подсказки
За МакОС, разумеется, ничего сказать не могу,
а в Win7 на FF 84.0.2 «Tooltip-подсказки» есть.
скрытый текстПримерный синтаксис такой - ищем ключевое слово в массиве и после изменения параметра запускаем указанное имя функции, а только потом выполняем флаг refresh.
values: [
["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Строки дополнительной подсказки", "RUN CheckProxy"],
["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Строки дополнительной подсказки", "JAVA custombuttons.setPrefs("network.proxy.type", 2)"], это прямо прописанная команда
["127.0.0.1", "отключен…", "0"], … …]
Логика работы: после установки параметра выполняем функцию CheckProxy, а только затем обновляем страницу (если refresh: true)То есть под-пункт меню должен после установки about:config параметра выполнять функцию или строку команды
Претензия на spec. Сейчас нет времени вникать,
но, если ничего не будет отвлекать, то, может, попробую.
некоторые действия
Отредактировано Dumby (24-03-2021 08:40:05)
Отсутствует
Претензия на spec. Сейчас нет времени вникать, но, если ничего не будет отвлекать, то, может, попробую.
Уточню, для QuickToggleSettings все варианты не нужны! Наиболее удобный, это убрать подсказку совсем или переделать, чтобы её текст был строкой с ключевым словом. А текст, начинающийся НЕ с ключевого слова, запускать как строку кода.
values: [ ["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "TOOLTIP после ключевого слова - текст подсказки", "custombuttons.setPrefs("network.proxy.type", 2)"], нет ключевого слова TOOLTIP, значит выполнить эту строку как Java-код.
Отсутствует
Приветствую моё первое сообщение
Пользуюсь Мозилой версией 63.0.3 и CB устанавливал custom_buttons-0.0.7.0.0.6-fx-paxmod.xpi и custom_buttons-0.0.7.0.0.6-fx-bootstrap.xpi . Далее два файла
// try {(code => { var {classes: Cc, interfaces: Ci, utils: Cu} = Components; var jsval, evl = true, re = e => Cu.reportError(e), imp = name => {try { return Cu.import(`resource://gre/modules/addons/${name}.jsm`, {}); } catch(ex) {}} if ((jsval = imp("AddonSettings"))) { jsval.AddonSettings = {ADDON_SIGNING: false, REQUIRE_SIGNING: false, ALLOW_LEGACY_EXTENSIONS: true}; try {evl = jsval.eval("this") === jsval;} catch(ex) {evl = false;} } var jsvals = ["XPIProvider", "XPIInstall"].map(imp).filter(i => i); jsvals[0].AddonSettings && lockPref("extensions.allow-non-mpc-extensions", true); jsvals[0].signaturesNotRequired = true; if (evl) return jsvals.forEach(jsval => {try {jsval.eval(code);} catch(ex) {re(ex);}}); var sl = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader); Cu.importGlobalProperties(["URL", "Blob"]); var url = URL.createObjectURL(new Blob([(code)])); jsvals.forEach(jsval => {try {sl.loadSubScript(url, jsval);} catch(ex) {re(ex);}}); })(String.raw`((vzss, pckg) => { var trueDesc = {enumerable: true, value: true}; typeof Extension == "function" && Object.defineProperty(Extension.prototype, "experimentsAllowed", trueDesc); "AddonInternal" in this && Object.defineProperty(AddonInternal.prototype, "providesUpdatesSecurely", trueDesc); this.isDisabledLegacy = () => false; if ("XPIDatabase" in this) this.XPIDatabase.isDisabledLegacy = () => false; try {SIGNED_TYPES.clear();} catch(ex) {}; if (!vzss && !pckg) return; var re = /\x06\x03U\x04\x03..(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}|[a-z0-9-\._]*\@[a-z0-9-\._]+)0\x82\x02"0\r\x06\t/i; var getUUID = () => { var gen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); return (getUUID = () => gen.generateUUID().toString())(); } var getIdFromString = str => { var match = str && str.match(re); return match ? match[1] : getUUID(); } var getState = arg => ({ signedState: AddonManager.SIGNEDSTATE_NOT_REQUIRED, cert: typeof arg == "object" ? arg : {commonName: arg} }); var checkAddon = addon => { if (addon.id || ( "_installLocation" in addon ? addon._installLocation.name == KEY_APP_TEMPORARY : addon.location.isTemporary )) return getState(null); } var getRoot = () => !AppConstants.MOZ_REQUIRE_SIGNING && Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false) ? Ci.nsIX509CertDB.AddonsStageRoot : Ci.nsIX509CertDB.AddonsPublicRoot; if (vzss) { var getURI = file => { var jsval = Cu.import("resource://gre/modules/addons/XPIProvider.jsm", {}); return (getURI = file => jsval.getURIForResourceInFile(file, "META-INF/mozilla.rsa"))(file); } var getIdFromFile = file => { var str, is = {close() {}}, sis = {close() {}}; try { is = Services.io.newChannelFromURIWithLoadInfo(getURI(file), null).open(); sis = Cc["@mozilla.org/scriptableinputstream;1"].createInstance(Ci.nsIScriptableInputStream); sis.init(is); str = sis.readBytes(sis.available()); } catch(ex) {} sis.close(); is.close(); return getIdFromString(str); } this.verifyZipSignedState = function verifyZipSignedState(aFile, aAddon) { var res = checkAddon(aAddon); return res ? Promise.resolve(res) : new Promise(resolve => { var callback = {openSignedAppFileFinished(rv, zipReader, cert) { zipReader && zipReader.close(); resolve(getState(cert || getIdFromFile(aFile))); }}; gCertDB.openSignedAppFileAsync(getRoot(), aFile, callback.wrappedJSObject = callback); }); } } if (pckg) Package.prototype.verifySignedState = function verifySignedState(addon) { var res = checkAddon(addon); return res ? Promise.resolve(res) : new Promise(resolve => this.verifySignedStateForRoot(addon, getRoot()).then(({cert}) => { if (cert) resolve(getState(cert)); else this.readBinary("META-INF", "mozilla.rsa").then( buffer => resolve(getState( getIdFromString(String.fromCharCode(...new Uint8Array(buffer))) )), () => resolve(getState(getUUID())) ); }, Cu.reportError) ); } })( "verifyZipSignedState" in this, typeof Package == "function" );`)} catch(err) { err.message != "Components is not defined" && Components.utils.reportError(err); }
pref("general.config.obscure_value", 0); pref("general.config.filename", "config.js"); pref("general.config.sandbox_enabled", false);
// Быстрое переключение параметров about:config от 24.07.2016 this._handleClick=()=>menuPopup.openPopup(this,"after_start");var menuPopup=self.appendChild(document.createElement("menupopup"));menuPopup.id='quick-aboutconfig-menupopup'; // Изменить иконку при несоответствие любого параметра пользовательскому предпочтению (см.ниже)||Иконка меняется только при изменеии параметров через меню кнопки, либо после его открытия. var s='CB.hasNotUserChoice';function toggleImage(){var val=custombuttons.getPrefs(s);self.image=val //var s='CB.hasNotUserChoice';function toggleImage(){custombuttons.getPrefs(s)? self.style.cssText='':self.style.cssText='filter:grayscale(100%)';}; ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB6klEQVQ4jZWTv2tUQRDHv8ntd28GLLQQfwS5VkuDSgRF/wlRiIiCQQQhhZ1VII1/wDUWkkLTBAsbC0FJYZGQ3NuZR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WebEAgjgSxcbRRYB46YhCcVxH9bqDP3nbyUBB0XPk+Cjgnvj1qoqohvJqDtTUBdcGAmSzgIEQBM2R0fY/U41GPkwNpcTBKfmnDPNN4w4TOX+NnbfAQAWAKmXcMVAMgaNqrM1UfqkbMmrXkT/nGJO1XF4Xod8/0Ak4KcKzTe3AROjPs/AMdM2M8atk25a8IXAKYawTZZj5jNEvZN2TVldg3Ny/RfkYizALAFnByu819tzvCRWXKqTwAAAABJRU5ErkJggg==';}; toggleImage();Services.prefs.addObserver(s,toggleImage,false);addDestructor(()=>Services.prefs.removeObserver(s,toggleImage)); // nodeName: menuitem - для логических(boolean) параметров, menu - для целых(integer) и строковых(string). menuseparator - для разделителя. // pref - параметр about:config. // Параметры имеющие значения отличные от дефолтных - выделены жирным стилем текста. // restart (задавать с пустым значением. т.е., restart: "") - добавляет возможность перезапуска браузера // (с подтверждением в диалоговом окне) после изменения параметра. // key - задает accesskey - клавиши для быстрой навигации по меню. // userChoice - задает предпочитаемое значение и если текущее значение с ним не совпадает, пункт меню/название меню помечаются красным цветом. // Также можно установить предупреждающую иконку для таких пунктов. См. стиль в посте ккнопки. // А также меняется иконка самой кнопки (см. выше). // strValues - значения и отображаемое в меню название значения. Задавать для целых(integer) и строковых(string) параметров. // Задается в виде: значение,,,название,,,accesskey|||значение2,,,название2,,,accesskey2|||значение3,,,название3 и т.д. (accesskey - задается опционально) // Полное значение отображается в подсказках, при наведении на название подменю/пункт подменю. // Для логических(boolean) - отображается сразу после самого параметра (значение true - также ставит галочку для него). // ЛКМ по пунктам меню - перключает значения для логических(boolean) параметров, // любая кнопка по пунктам в субменю - задает это значение для целых(integer) и строковых(string) параметров. // ПКМ по пунктам меню и названию субменю - сбрасывает значение параметра в дефолтное. // Клавиатура: Enter - переключение параметра. // Спецклавиша вызова контекстного меню / Shift+Enter - сброс в дефолтное значение. // Alt + M - открыть меню кнопки. (Сочетание можно сменить на свое. См. в конце кода) [ //{nodeName:"menuitem", name:"Откл. дискового кэша", pref:"browser.cache.disk.enable", userChoice:"false"}, //{nodeName:"menuitem", name:"Откл. кэша в оперативной памяти", pref:"browser.cache.memory.enable", userChoice:"false"}, //{nodeName:"menuseparator"}, //{nodeName:"menuitem", name:"Откл. локального хранилища DB (Storage)", pref:"dom.indexedDB.enabled", key:'d'}, //{nodeName:"menuitem", name:"Откл. локального хранилища", pref:"dom.storage.enabled", key:'s'}, //{nodeName:"menuseparator"}, //{nodeName:"menu", name:"Back-story-cash [Tessssttt]", pref:"browser.sessionhistory.max_total_viewers", strValues:"0,,,0"}, //{nodeName:"menu", pref:"image.animation_mode", key:'i', userChoice:"none", strValues:"normal,,,Анимация картинок вкл.,,,|||none,,,Анимация картинок выкл.,,,"}, //{nodeName:"menu", pref:"network.cookie.cookieBehavior", key:'k', userChoice:"1", strValues:"2,,,Не принимать куки с сайтов,,,|||0,,,Принимать куки со сторонних сайтов всегда,,,|||3,,,Принимать куки со сторонних посещённых сайтов,,,|||1,,,Принимать куки со сторонних сайтов никогда,,,"}, //{nodeName:"menuseparator"}, //{nodeName:"menu", pref:"general.useragent.locale", key:'l', restart:"", strValues:"en-US,,,English,,,e|||ru,,,Русский,,,r"}, //{nodeName:"menu", name:"language", pref:"intl.accept_languages", strValues:"en-US, en;q=0.5,,,en-US, en;q=0.5,,,e|||en-US, en, ru-RU, ru,,,en-US, en, ru-RU, ru,,,r"}, //{nodeName:"menu", pref:"browser.display.document_color_use", key:'c', userChoice:"0", strValues:"0,,,Automatic,,,0|||1,,,Always,,,1|||2,,,Never,,,2"}, //{nodeName:"menu", pref:"CB.TEST", key:'t', userChoice:"C:\\Downloads\\TEST1", strValues:"C:\\Downloads\\TEST1,,,TEST1,,,1|||C:\\Downloads\\TEST2,,,TEST2,,,2"} //{nodeName:"menuseparator"}, //{nodeName:"menuitem", name:"Откл. инфу начало/конец загрузки стр", pref:"dom.enable_performance", userChoice:"false"}, //{nodeName:"menu", name:"Вкл/Выкл Referer", pref:"network.http.sendRefererHeader", strValues:"0,,,0"}, //{nodeName:"menuitem", name:"В качестве реферера корень сайта", pref:"network.http.referer.spoofSource", userChoice:"true"}, //{nodeName:"menu", name:"referer.trimmingPolicy", pref:"network.http.referer.trimmingPolicy", strValues:"2,,,2"}, //{nodeName:"menuseparator"}, //{nodeName:"menu", name:"On/Off Image", pref:"permissions.default.image", userChoice:1, strValues:"2,,,Off"}, //{nodeName:"menuitem", name:"On/Off Multiprocessing", pref:"browser.tabs.remote.autostart", restart:"", userChoice:"true"}, //about:support=Multiprocess Windows|forum.ru-board.com/topic.cgi?forum=5&topic=49695&start=0&limit=1&m=9#1 //opennet.ru/opennews/art.shtml?num=50691 //{nodeName:"menuitem", name:"On/Off javascript", pref:"javascript.enabled", key:'j', userChoice:"true"}, //{nodeName:"menuitem", pref:"dom.workers.enabled", key:'w', userChoice:"false"}, //{nodeName:"menuitem", pref:"media.autoplay.enabled", key:'m', userChoice:"false"}, //{nodeName:"menu", name:"Stopautoplay", pref:"media.autoplay.default", userChoice:0, strValues:"0,,,Stop,,,0|||1,,,Play,,,1"}, //{nodeName:"menuitem", pref:"xpinstall.signatures.required"}, //Check is compatibility //{nodeName:"menuitem", pref:"browser.bookmarks.autoExportHTML"}, //BookmarksHtml [false=places.sqlite] //{nodeName:"menuitem", pref:"media.peerconnection.enabled"}, //WebRTC false=off! //{nodeName:"menuitem", name:"On/Off useragentS", pref:"general.useragent.site_specific_overrides", userChoice:"true"}, //{nodeName:"menuitem", name:"On/Off media.play-stand-alone", pref:"media.play-stand-alone"}, //сразу скачивать медиафайлы, без перехода на новую страницу. {nodeName:"menuseparator"}, {nodeName:"menu", name:"Язык браузера", pref:"intl.locale.requested", restart:"", strValues:"en-US,,,English,,,e|||ru-RU,,,Русский,,,r"}, {nodeName:"menu", name:"Язык веб-страниц", pref:"intl.accept_languages", strValues:"en-US, en, ru-RU, ru,,,English,,,e|||ru-RU, ru, en-US, en,,,Русский,,,r"}, {nodeName:"menuseparator"}, //{nodeName:"menu", name:"Configure Proxies", pref:"network.proxy.type", userChoice:5, strValues:"1,,,httpP,,,1|||2,,,AutomaticP,,,2|||5,,,Use systemP,,,5"}, //{nodeName:"menu", name:"AutomaticP", pref:"network.proxy.autoconfig_url", strValues:"file:///X:/FFQ/_.pac,,,file:///X:/FFQ/_.pac,,,1|||https://antizapret.prostovpn.org/proxy.pac,,,https://antizapret.prostovpn.org/proxy.pac,,,2"}, //{nodeName:"menuseparator"}, //userChoice:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/99.0", //{nodeName:"menu", name:"User Agent", pref:"general.useragent.override", key:'u', strValues:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0,,,Firefox 60/MacOSX 10.13|||Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36,,,Chrome 66/MacOSX 10.13.5|||Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36,,,Chrome 57/MacOSX|||Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30,,,Safari Generic/MacOSX|||Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36,,,Chrome57/W7|||Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12 Version/12.16,,,Opera12/W8|||Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Safari/537.36,,,Chrome61/W10|||Mozilla/5.0 (Linux; Android 7.0; PLUS Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.98 Mobile Safari/537.36,,,Chrome61/Android7|||Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html),,,GoogleBot|||Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots),,,YandexBot|||Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp),,,YahooBot|||Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm),,,BingBot|||DuckDuck bot/1.0; (+http://duckduckgo.com/duckduckbot.html),,,DuckDuckBot|||Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html),,,BaiduspiderBot|||ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com),,,AlexaCrawlerBot|||Mozilla/5.0 (Linux; Android 5.1.1; SM-G928X Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36,,,Samsung Galaxy S6 Edge Plus|||Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586,,,Microsoft Lumia 950|||Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586,,,Xbox One|||Mozilla/5.0 (PlayStation 4 3.11) AppleWebKit/537.73 (KHTML, like Gecko),,,Playstation 4|||,,,Пустое значение"}, ].forEach(function(m){var mItem=document.createElement(m.nodeName);var browserRestart=''; if ("restart" in m) browserRestart=' if (custombuttons.confirmBox(null, "Restart?", "Yes", "Cancel")) Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);'; if ("name" in m) mItem.setAttribute('name',m.name);if ("pref" in m) {mItem.setAttribute('closemenu','none'); mItem.setAttribute('oncontextmenu','event.preventDefault();custombuttons.clearPrefs("'+m.pref+'");'+browserRestart);} if ("key" in m) mItem.setAttribute('accesskey', m.key);if (m.nodeName==="menuitem") {mItem.setAttribute('type','checkbox'); mItem.setAttribute('oncommand','custombuttons.setPrefs("'+m.pref+'",!custombuttons.getPrefs("'+m.pref+'"));if (event.shiftKey && event.keyCode==event.DOM_VK_RETURN){event.preventDefault();custombuttons.clearPrefs("'+m.pref+'")};'+browserRestart);} if (m.nodeName==="menu"){mItem.setAttribute('class','menu-iconic'); var subMenu=mItem.appendChild(document.createElement("menupopup")); for (var value of m.strValues.split('|||')){var submItem=document.createElement("menuitem");var smVal=value.split(',,,')[0]; var smValConv=convertFromUnicode("UTF-8",smVal);var smName=value.split(',,,')[1];var key=value.split(',,,')[2]; key && submItem.setAttribute('accesskey',key);submItem.setAttribute('type','radio');submItem.setAttribute('label',smName);submItem.setAttribute('tooltiptext',smVal);submItem.setAttribute('closemenu','none'); submItem.setAttribute('oncommand','try{custombuttons.setPrefs("'+m.pref+'","'+smValConv.replace(/\\/g,'\\\\')+'")}catch(e){Services.prefs.setIntPref("'+m.pref+'","'+smValConv+'")};'+browserRestart); subMenu.appendChild(submItem);}} menuPopup.appendChild(mItem); // Листенеры отслеживающие переключение параметров // и устанавливающие соответствующие названия и чекбоксы для пунктов меню при открытии меню и кликах for (var type of ['command','popupshowing','contextmenu']){addEventListener(type,(e)=>{setTimeout(()=>{if ("pref" in m){var val,def; def=Services.prefs.prefHasUserValue(m.pref); try {val=Services.prefs.getComplexValue(m.pref,Ci.nsISupportsString).data;} catch(e) { if (Services.prefs.getPrefType(m.pref)==64) val=custombuttons.getPrefs(m.pref).toString();else val=custombuttons.getPrefs(m.pref);} def ? mItem.style.setProperty('font-weight', 'bold', 'important') : mItem.style.removeProperty('font-weight');} if (m.nodeName==='menuitem'){mItem.setAttribute('checked',val);mItem.label=(mItem.hasAttribute('name') ? mItem.getAttribute('name') : m.pref)+' - "'+val+'"'; if ("userChoice" in m){try {var usrChc=(val.toString()===m.userChoice)} catch(e) {usrChc=false}; mItem.setAttribute('user-choice',usrChc);usrChc ? mItem.style.removeProperty('color') : mItem.style.setProperty('color','orangered','important');}} if (subMenu){for (var smitem of subMenu.getElementsByTagName('menuitem')) {var smval=smitem.getAttribute('tooltiptext');smitem.setAttribute('checked',(val===smval) ? true : false);}} if (m.nodeName==="menu") {var vname; try {vname=subMenu.getElementsByAttribute('checked','true')[0].getAttribute('label');} catch(e) {if (!Services.prefs.prefHasUserValue(m.pref)) vname='Default';else vname='Other';} mItem.setAttribute('label',(mItem.hasAttribute('name') ? mItem.getAttribute('name') : m.pref)+' - "'+vname+'"'); mItem.setAttribute('tooltiptext',val || 'This preferences has null value or does not exist.'); if ("userChoice" in m) {var smUsrChc=(val===m.userChoice.toString());mItem.setAttribute('user-choice',smUsrChc); smUsrChc ? mItem.style.removeProperty('color') : mItem.style.setProperty('color','orangered','important');}} if ("userChoice" in m) {var hasNotUserChoice=menuPopup.getElementsByAttribute('user-choice','false')[0];custombuttons.setPrefs(s,hasNotUserChoice ? true : false);}}, 0)},false,menuPopup)}}); // Листенер позволяющий сброс параметров с субменю по Shift + Enter||За код спасибо Dumby addEventListener("popupshown",{handleEvent: function(e){this[e.type](e);}, popupshown: function(e) {if (e.target!=menuPopup) return;menuPopup.addEventListener("popuphidden", this, false);window.addEventListener("keydown", this, true);}, popuphidden: function(e) {if (e.target!=menuPopup) return;menuPopup.removeEventListener("popuphidden", this, false);window.removeEventListener("keydown", this, true);}, popupshowing: function(e) {e.target.parentNode.removeEventListener("popupshowing", this, false);e.preventDefault();},get old() {delete this.old; this.e = new MouseEvent("contextmenu", {});return this.old=parseInt(Services.appinfo.platformVersion) < 25;},get prop() {delete this.prop; if ("key" in KeyboardEvent.prototype) this.prop = "key", this.val="Enter";else this.prop = "keyCode", this.val=KeyboardEvent.DOM_VK_RETURN;return this.prop;}, keydown: function(e) {if (!e.shiftKey || e.ctrlKey || e.altKey || e[this.prop] != this.val) return;var target=menuPopup.querySelector("menu[_moz-menuactive]:not([open])"); if (!target) return;this.old ? target.addEventListener("popupshowing", this, false) : e.stopPropagation();target.dispatchEvent(this.e);menuPopup.dispatchEvent(this.e);}}, false, menuPopup); // Открыть меню кнопки по сочетанию клавиш Alt + M (не зависит от текущей раскладки клавиатуры) // Посмотреть коды клавиш можно здесь: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode#Constants_for_keyCode_value addEventListener('keyup',(e)=>{if (e.altKey && !e.shiftKey && !e.ctrlKey && e.keyCode==77){e.preventDefault();e.stopPropagation(); menuPopup.showPopup(this,-1,-1,"popup","bottomleft","topleft");}},false,window); // Конвертировать текст в юникод ............. function convertFromUnicode(charset,str) {var converter=Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter); converter.charset=charset;str=converter.ConvertFromUnicode(str);return str+converter.Finish();};
Вопрос простой, что сделать чтобы кнопка заработала?
7 ULT SP1; 69.0.3
Отсутствует
код кнопки добавил в Инициализацию
Чисто из любопытства:
а кодом, который предложил господин «Сам Custom Buttons бесполезен»,
пробовал в Инициализации заменить?
Реверс этого, конечно, (плюс рестарт).
в Настройках расширения поставил галочку в пункте "Отключить инициализацию кнопок ... "
Отсутствует
Dumby
Ничего не понял. Можно по конкретней и по проще объяснить. Что и какие действия необходимы для решения проблемы с кнопкой?
Отсутствует
DenisRodman
Ожидалось
Да, заменил приведённый код в Инициализации, на код,
предоставленный господином «Сам Custom Buttons бесполезен».Снял галку в пункте "Отключить инициализацию кнопок ... ", перезапустился.
Теперь работает (всё ещё не работает).
Но найдено
Ничего не понял.
Я бы и сам проверил, но там ссылка на (для меня) г-хостинг.
А что-то искать лениво.
Отсутствует
Отсутствует
QuickToggleAC.js
Да, забрал, спасибо.
DenisRodman
Ну вот, не особо тщательно, но проверил.
Win7 SP1, CB 0.0.7.0.0.6, FF 69.0.3 (32-битный)
Разместил код в Инициализации, и, вроде, работает.
Отсутствует
Dumby
Это хорошо конечно, только мне то какие действия сделать нужно?
P.S. Я надеюсь по моим сообщениям и вопросам понятно, что в этой теме я чайник, так что ответы мне бы по проще и нормальным языком, а то я не пойму. Всё таки форум вещь такая, когда каждый спец думает, что его все понимают, но это далеко не так, одно дело когда ты хоть немного в теме, я повторюсь не в теме .
Отредактировано DenisRodman (24-03-2021 20:51:26)
Отсутствует
Dumby - ещё хотелка для QuickToggleSettings
Сделать пункты меню, запускающие любой код или функцию, то есть без подменю настроек, По клику на строке меню надо запустить прописанный там код или указанное имя функции.
Возможно, такая кнопка - (объединяющая в себе несколько) уже есть на форуме - при клике на неё открывается менюшка, пункты которой запускают различный код.
QuickToggleAC.js
Да, забрал, спасибо.
Эта кнопка по коду от моей отличается только отсутствием Mouse LongClick…
Отсутствует
ответы мне бы по проще и нормальным языком, а то я не пойму
Даже не знаю, наверно проще всего так:
1. Выделить тройным кликом нижеприведенный URL кнопки.
2. Скопировать в буфер обмена (Ctrl+C).
3. ПКМ на кнопке —> «Обновить кнопку».
custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname/%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFPSURBVDhPnVPNSsNAEJ5tamnBk+A7BMEcikohp/gi9i18nRafQoT00kK16tnn8CJo4vp9m5m41eSgH0zmd3d+diJ/gfdedvl0QW7k1PcLwem+3TjowZagK+Nn6yc3gNCJ+LCCh9LzzTMdqeoNbkQSFZmpJLGCW5Gx2hZaQahMbZ52VuDSfHpnAVJXOb4FKzianbzCXiLrHLYl5C3t5NTRwtxaKJxUTZ/JcOTr6q2Rxwf0aVb2/hLs4KqL3Isckz/mmSdRRksjyg+z7IM6LzDCBfuvAEOJmIKBOqAWmo1YodxLlQNsyO0rsIV/AZM+JGc2a4GgzhZ2p9mFmrpboCMqNYBDdMlwompoTWN6F2nFT5hBXb0PEpmo/Gk+oH+RrqNZINPeIlnZViV1jQuLFJQuWGB0gJdwgShvqdPXZv6J+F/QS7oXqQ9xBTFZ5oa8fAGs9fed5YhPSwAAAABJRU5ErkJggg%3D%3D%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B//%20Quick%20Toggle%20https%3A//forum.mozilla-russia.org/viewtopic.php%3Fpid%3D784139%23p784139%0A//%20https%3A//forum.mozilla-russia.org/viewtopic.php%3Fpid%3D784165%23p784165%0A//%20%u0411%u044B%u0441%u0442%u0440%u043E%u0435%20%u043F%u0435%u0440%u0435%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u0435%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%20about%3Aconfig%0A%28async%20%28name%2C%20id%2C%20func%29%20%3D%3E%20%7B%0A%09if%20%28name%20%3D%3D%20%22Object%22%29%20return%20CustomizableUI.createWidget%28func%28%29%29%3B%0A%09var%20win%20%3D%20name%20%3D%3D%20%22Window%22%2C%20g%20%3D%20Components.utils.import%28%22resource%3A//gre/modules/Services.jsm%22%2C%20%7B%7D%29%3B%0A%09if%20%28g%5Bid%5D%29%20%7Bif%20%28win%29%20return%3B%7D%20else%20g%5Bid%5D%20%3D%20func%28%29%3B%0A%09if%20%28win%29%20return%20CustomizableUI.createWidget%28g%5Bid%5D%29%3B%0A%09addDestructor%28r%20%3D%3E%20r%5B5%5D%20%3D%3D%20%22e%22%20%26%26%20delete%20g%5Bid%5D%29%3B%0A%09g%5Bid%5D.onCreated%28this%29%3B%0A%7D%29%28this.constructor.name%2C%20%22QuickToggleAboutConfigSettings%22%2C%20%28%29%20%3D%3E%20%7B%0A%0A%09var%20%7Bprefs%7D%20%3D%20Services%2C%20db%20%3D%20prefs.getDefaultBranch%28%22%22%29%3B%0A%09var%20pv%20%3D%20parseInt%28Services.appinfo.platformVersion%29%3B%0A%09var%20xul_ns%20%3D%20%22http%3A//www.mozilla.org/keymaster/gatekeeper/there.is.only.xul%22%3B%0A%0A//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0A%09//%20refresh%3A%0A%09//%09false%20-%20reload%20current%20tab%0A%09//%09true%20-%20reload%20current%20tab%20skip%20cache%0A%09//%0A%09//%20restart%3A%0A%09//%09false%20-%20restart%20browser%0A%09//%09true%20-%20restart%20browser%20with%20confirm%0A%0A%09var%20primary%20%3D%20%5B%7B%0A%0A%09%09%09pref%3A%20%5B%22network.proxy.share_proxy_settings%22%2C%20%22%u041F%u0440%u043E%u043A%u0441%u0438%20%u0434%u043B%u044F%20%u0432%u0441%u0435%u0445%20%u043F%u0440%u043E%u0442%u043E%u043A%u043E%u043B%u043E%u0432%20%u043F%u0440%u0438%20%u0440%u0443%u0447%u043D%u043E%u0439%20%u043D%u0430%u0441%u0442%u0440%u043E%u0439%u043A%u0435%22%5D%2C%0A%09%09%09userChoice%3A%20true%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22network.proxy.type%22%2C%20%22%u041D%u0430%u0441%u0442%u0440%u043E%u0439%u043A%u0438%20%u043F%u0440%u043E%u043A%u0441%u0438%22%5D%2C%0A%09%09%09userChoice%3A%200%2C%20userAlt%3A%202%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%0A%09%09%09%09%5B0%2C%20%22%u0411%u0435%u0437%20%u043F%u0440%u043E%u043A%u0441%u0438%22%2C%20%220%22%5D%2C%20%5B5%2C%20%22%u0421%u0438%u0441%u0442%u0435%u043C%u043D%u044B%u0435%20%28%u0438%u0437%20IE%29%22%2C%20%225%22%5D%2C%20%5B2%2C%20%22%u0410%u0432%u0442%u043E%u043D%u0430%u0441%u0442%u0440%u043E%u0439%u043A%u0430%20%u0441%20URL%20%28pacfile%29%22%2C%20%222%22%5D%2C%0A%09%09%09%09%5B1%2C%20%22%u0420%u0443%u0447%u043D%u0430%u044F%20%u043D%u0430%u0441%u0442%u0440%u043E%u0439%u043A%u0430%22%2C%20%221%22%5D%2C%20%5B4%2C%20%22%u0410%u0432%u0442%u043E%u043E%u043F%u0440%u0435%u0434%u0435%u043B%u0435%u043D%u0438%u0435%22%2C%20%224%22%5D%0A%09%5D%7D%2C/*%20%7B%0A%09%09%09pref%3A%20%5B%22network.proxy.socks_remote_dns%22%2C%20%22%u041E%u0442%u043F%u0440%u0430%u0432%u043B%u044F%u0442%u044C%20DNS-%u0437%u0430%u043F%u0440%u043E%u0441%u044B%20%u0447%u0435%u0440%u0435%u0437%20%u043F%u0440%u043E%u043A%u0441%u0438%20%u043F%u0440%u0438%20%u0438%u0441%u043F%u043E%u043B%u044C%u0437%u043E%u0432%u0430%u043D%u0438%u0438%20SOCKS%205%22%5D%2C%0A%09%09%09userChoice%3A%20true%2C%20refresh%3A%20false%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%20*/%7B%0A%09%09%09pref%3A%20%5B%22network.trr.mode%22%2C%20%22DNS%20%u0447%u0435%u0440%u0435%u0437%20HTTPS%22%5D%2C%0A%09%09%09userChoice%3A%202%2C%20userAlt%3A%201%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%0A%09%09%09%09%5B0%2C%20%22%u0412%u044B%u043A%u043B%u044E%u0447%u0435%u043D%22%2C%20%220%22%5D%2C%20%5B1%2C%20%22Firefox%20%u0432%u044B%u0431%u0438%u0440%u0430%u0435%u0442%20%u0441%u0430%u043C%u044B%u0439%20%u0431%u044B%u0441%u0442%u0440%u044B%u0439%22%2C%20%221%22%5D%2C%20%5B2%2C%20%22DNS%20%u0447%u0435%u0440%u0435%u0437%20HTTPS%20TRR%20+%20%u043C%u043E%u0439%22%2C%20%222%22%5D%2C%0A%09%09%09%09%5B3%2C%20%22DNS%20%u0447%u0435%u0440%u0435%u0437%20HTTPS%20%u0442%u043E%u043B%u044C%u043A%u043E%20TRR%22%2C%20%223%22%5D%2C%20%5B4%2C%20%22%u0422%u0435%u043D%u0435%u0432%u043E%u0439%20%u0440%u0435%u0436%u0438%u043C%22%2C%20%224%22%5D%2C%20%5B5%2C%20%22%u041E%u0442%u043A%u043B%u044E%u0447%u0438%u0442%u044C%20TRR%20%u043F%u043E%20%u0432%u044B%u0431%u043E%u0440%u0443%22%2C%20%225%22%5D%0A%09%5D%7D%2C%0A%09%09%09null%2C%0A%09/*%20%7B%0A%09%09%09pref%3A%20%5B%22permissions.default.image%22%2C%20%22%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%20%u0437%u0430%u0433%u0440%u0443%u0437%u043A%u0443%20%u0438%u0437%u043E%u0431%u0440%u0430%u0436%u0435%u043D%u0438%u0439%22%5D%2C%0A%09%09%09userChoice%3A%201%2C%20userAlt%3A%203%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5B1%2C%20%22%u0414%u0430%22%5D%2C%20%5B3%2C%20%22%u0422%u043E%u043B%u044C%u043A%u043E%20%u0441%20%u0441%u0430%u0439%u0442%u0430%22%5D%2C%20%5B2%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%20*/%7B%0A%09%09%09pref%3A%20%5B%22dom.security.https_only_mode%22%2C%20%22%u0422%u043E%u043B%u044C%u043A%u043E%20https%22%5D%2C%0A%09%09%09userChoice%3A%20true%2C%20refresh%3A%20false%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22True%22%5D%2C%20%5Bfalse%2C%20%22False%22%5D%5D%0A%09%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22dom.security.https_only_mode_ever_enabled%22%2C%20%22%u0412%u043A%u043B%u044E%u0447%u0430%u043B%u0441%u044F%20%u043B%u0438%20%u043A%u043E%u0433%u0434%u0430-%u043D%u0438%u0431%u0443%u0434%u044C%20%u0442%u043E%u043B%u044C%u043A%u043E%20https%22%5D%2C%0A%09%09%09userChoice%3A%20false%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22security.mixed_content.block_display_content%22%2C%20%22%u041F%u0430%u0441%u0441%u0438%u0432%u043D%u044B%u0439%20%u043A%u043E%u043D%u0442%u0435%u043D%u0442%20%u0442%u043E%u043B%u044C%u043A%u043E%20https%22%5D%2C%0A%09%09%09userChoice%3A%20true%2C%20refresh%3A%20false%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22security.mixed_content.upgrade_display_content%22%2C%20%22%u0410%u043F%u0433%u0440%u0435%u0439%u0434%20%u0441%u0441%u044B%u043B%u043E%u043A%20%u0434%u043E%20https%20%u0438%u043B%u0438%20%u0431%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u043A%u0430%22%5D%2C%0A%09%09%09userChoice%3A%20true%2C%20refresh%3A%20false%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%0A%09%20%20%20%20null%2C%0A%09/*%20%7B%0A%09%09%09pref%3A%20%5B%22gfx.webrender.all%22%2C%20%22WebRender%20%u0434%u043B%u044F%20%u0432%u0441%u0435%u0433%u043E%22%5D%2C%0A%09%09%09userChoice%3A%20false%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%20*/%7B%0A%09%09%09pref%3A%20%5B%22media.webm.enabled%22%2C%20%22%u0414%u0435%u043A%u043E%u0434%u0435%u0440%20WebM%20VP8%22%5D%2C%0A%09%09%09userChoice%3A%20false%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%0A%09%20%20%20%20null%2C%0A%09%7B%0A%09%09%09pref%3A%20%5B%22image.animation_mode%22%2C%20%22%u0410%u043D%u0438%u043C%u0430%u0446%u0438%u044F%20%u0438%u0437%u043E%u0431%u0440%u0430%u0436%u0435%u043D%u0438%u0439%22%5D%2C%0A%09%09%09userChoice%3A%20%22none%22%2C%20userAlt%3A%20%22once%22%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5B%22none%22%2C%20%22%u0412%u044B%u043A%u043B%u044E%u0447%u0435%u043D%u0430%22%5D%2C%20%5B%22normal%22%2C%20%22%u0412%u043A%u043B%u044E%u0447%u0435%u043D%u0430%22%5D%2C%20%5B%22once%22%2C%20%22%u0415%u0434%u0438%u043D%u043E%u0436%u0434%u044B%22%5D%5D%0A%09%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22media.autoplay.default%22%2C%20%22%u0410%u0432%u0442%u043E%u0432%u043E%u0441%u043F%u0440%u043E%u0438%u0437%u0432%u0435%u0434%u0435%u043D%u0438%u0435%20%u0430%u0443%u0434%u0438%u043E%20%u0438%20%u0432%u0438%u0434%u0435%u043E%22%5D%2C%0A%09%09%09userChoice%3A%205%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%0A%09%09%09%09%5B0%2C%20%22%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%20%u0430%u0432%u0442%u043E%u0432%u043E%u0441%u043F%u0440%u043E%u0438%u0437%u0432%u0435%u0434%u0435%u043D%u0438%u0435%22%2C%20%220%22%5D%2C%0A%09%09%09%09%5B1%2C%20%22%u041D%u0435%20%u0440%u0430%u0437%u0440%u0435%u0448%u0430%u0442%u044C%20%u0430%u0432%u0442%u043E%u0432%u043E%u0441%u043F%u0440%u043E%u0438%u0437%u0432%u0435%u0434%u0435%u043D%u0438%u0435%22%2C%20%221%22%5D%2C%0A%09%09%09%09%5B2%2C%20%22%u0412%u0441%u0435%u0433%u0434%u0430%20%u0441%u043F%u0440%u0430%u0448%u0438%u0432%u0430%u0442%u044C%22%2C%20%222%22%5D%2C%0A%09%09%09%09%5B5%2C%20%22%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%20%u0430%u0443%u0434%u0438%u043E%20%u0438%20%u0432%u0438%u0434%u0435%u043E%22%2C%20%225%22%5D%0A%09%5D%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22media.autoplay.blocking_policy%22%2C%20%22%u0410%u0432%u0442%u043E%u0437%u0430%u043F%u0443%u0441%u043A%20%28%u043F%u043E%u043B%u0438%u0442%u0438%u043A%u0430%29%22%5D%2C%0A%09%09%09userChoice%3A%201%2C%20userAlt%3A%202%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%0A%09%09%09%09%5B1%2C%20%22%u0412%u0440%u0435%u043C%u0435%u043D%u043D%u0430%u044F%22%2C%20%221%22%5D%2C%0A%09%09%09%09%5B2%2C%20%22%u041F%u043E%20%u0434%u0435%u0439%u0441%u0442%u0432%u0438%u044E%22%2C%20%222%22%5D%2C%0A%09%09%09%09%5B0%2C%20%22%u041F%u043E%u0441%u0442%u043E%u044F%u043D%u043D%u0430%u044F%22%2C%20%220%22%5D%0A%09%5D%7D%2C/*%20%7B%0A%09%09%09pref%3A%20%5B%22plugin.state.flash%22%2C%20%22Flash-plugin%22%5D%2C%0A%09%09%09userChoice%3A%202%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%0A%09%09%09%09%5B2%2C%20%22%u0412%u0441%u0435%u0433%u0434%u0430%20%u0432%u043A%u043B%u044E%u0447%u0430%u0442%u044C%22%2C%20%222%22%5D%2C%0A%09%09%09%09%5B1%2C%20%22%u0412%u043A%u043B%u044E%u0447%u0430%u0442%u044C%20%u043F%u043E%20%u0437%u0430%u043F%u0440%u043E%u0441%u0443%22%2C%20%221%22%5D%2C%0A%09%09%09%09%5B0%2C%20%22%u041D%u0438%u043A%u043E%u0433%u0434%u0430%20%u043D%u0435%20%u0432%u043A%u043B%u044E%u0447%u0430%u0442%u044C%22%2C%20%220%22%5D%0A%09%5D%7D%2C%20*/%0A%09%20%20%20%20null%2C%0A%09/*%20%7B%0A%09%20%20%20%20pref%3A%20%5B%22browser.contentblocking.category%22%2C%20%22%u041A%u0430%u0442%u0435%u0433%u043E%u0440%u0438%u044F%20%u0437%u0430%u0449%u0438%u0442%u044B%22%5D%2C%0A%09%20%20%20%20userChoice%3A%20%22custom%22%2C%20refresh%3A%20true%2C%0A%09%20%20%20%20values%3A%20%5B%0A%09%20%20%20%20%20%20%5B%22standard%22%2C%20%22%u0421%u0442%u0430%u043D%u0434%u0430%u0440%u0442%u043D%u0430%u044F%22%2C%20%221%22%5D%2C%20%5B%22strict%22%2C%20%22%u0421%u0442%u0440%u043E%u0433%u0430%u044F%22%2C%20%222%22%5D%2C%20%5B%22custom%22%2C%20%22%u041F%u0435%u0440%u0441%u043E%u043D%u0430%u043B%u044C%u043D%u0430%u044F%22%2C%20%223%22%5D%0A%09%5D%7D%2C%20*/%0A%09/*%20%7B%0A%09%09%09pref%3A%20%5B%22network.cookie.cookieBehavior%22%2C%20%22Cookies%22%5D%2C%0A%09%09%09userChoice%3A%201%2C%20userAlt%3A%203%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%0A%09%09%09%09%5B1%2C%20%22%u0412%u0441%u0435%20%u0441%u0442%u043E%u0440%u043E%u043D%u043D%u0438%u0435%20%u043A%u0443%u043A%u0438%22%5D%2C%20%5B3%2C%20%22%u041A%u0443%u043A%u0438%20%u0441%20%u043D%u0435%20%u043F%u043E%u0441%u0435%u0449%u0435%u043D%u043D%u044B%u0445%20%u0441%u0430%u0439%u0442%u043E%u0432%22%5D%2C%20%5B4%2C%20%22%u041C%u0435%u0436%u0441%u0430%u0439%u0442%u043E%u0432%u044B%u0435%20%u0438%20%u0441%u043E%u0446%u0438%u0430%u043B%u044C%u043D%u044B%u0435%20%u0442%u0440%u0435%u043A%u0435%u0440%u044B%22%5D%2C%0A%09%09%09%09%5B2%2C%20%22%u0412%u0441%u0435%20%u043A%u0443%u043A%u0438%22%5D%2C%20%5B0%2C%20%22%u041F%u0440%u0438%u043D%u0438%u043C%u0430%u0442%u044C%20%u0441%u043E%20%u0432%u0441%u0435%u0445%22%5D%0A%09%5D%7D%2C%0A%09%09%09null%2C%20*/%0A%09%7B%0A%09%09%09pref%3A%20%5B%22dom.storage.enabled%22%2C%20%22%u041B%u043E%u043A%u0430%u043B%u044C%u043D%u043E%u0435%20%u0445%u0440%u0430%u043D%u0438%u043B%u0438%u0449%u0435%22%5D%2C%0A%09%09%09userChoice%3A%20true%0A%09%7D%2C%7B%0A%09%09%09pref%3A%20%5B%22dom.caches.enabled%22%2C%20%22%u0412%u043A%u043B%u044E%u0447%u0438%u0442%u044C%20Cache%20Service%20Workers%20%u0438%20Cache%20Storage%22%5D%2C%0A%09%09%09userChoice%3A%20false%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22True%22%5D%2C%20%5Bfalse%2C%20%22False%22%5D%5D%0A%09%7D%0A%5D%3B%0A%0A//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0A%09var%20secondary%20%3D%20%5B%7B%0A%09%09%09pref%3A%20%5B%22dom.IntersectionObserver.enabled%22%2C%20%22Intersection%20Observer%20API%20%28DevTools%29%22%5D%2C%0A%09%09%09userChoice%3A%20false%2C%20refresh%3A%20true%2C%0A%09%09%09values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%7D%2C%0A%09%09%09null%2C%0A%20%20%20%20%7B%0A%0A%09%09%09pref%3A%20%5B%22dom.enable_performance%22%2C%20%22%u0421%u0442%u0430%u0442%u0443%u0441%20%u0437%u0430%u0433%u0440%u0443%u0437%u043A%u0438%20%u0441%u0442%u0440%u0430%u043D%u0438%u0446%u044B%22%5D%2C%0A%09%09%09userChoice%3A%20false%0A%09%7D%2C%0A%09%09%09null%2C%0A%09%7B%0A%09%09%09pref%3A%20%5B%22intl.accept_languages%22%2C%20%22%u042F%u0437%u044B%u043A%20%u0434%u043B%u044F%20%u0432%u0435%u0431-%u0441%u0442%u0440%u0430%u043D%u0438%u0446%22%5D%2C%0A%09%09%09userChoice%3A%20%22ru-RU%2C%20ru%2C%20en-US%2C%20en%22%2C%0A%09%09%09values%3A%20%5B%5B%22en-US%2C%20en%2C%20ru-RU%2C%20ru%22%2C%20%22%u0410%u043D%u0433%u043B%u0438%u0439%u0441%u043A%u0430%u044F%20%u043B%u043E%u043A%u0430%u043B%u044C%22%5D%2C%20%5B%22ru-RU%2C%20ru%2C%20en-US%2C%20en%22%2C%20%22%u0420%u0443%u0441%u0441%u043A%u0430%u044F%20%u043B%u043E%u043A%u0430%u043B%u044C%22%5D%5D%0A%09%7D%2C/*%20%7B%0A%09%09%09pref%3A%20%5B%22browser.display.document_color_use%22%2C%20%22%u0418%u0441%u043F%u043E%u043B%u044C%u0437%u043E%u0432%u0430%u0442%u044C%20%u0446%u0432%u0435%u0442%u0430%20%u0441%u0430%u0439%u0442%u043E%u0432%22%5D%2C%0A%09%09%09userChoice%3A%200%2C%0A%09%09%09values%3A%20%5B%5B0%2C%20%22%u0410%u0432%u0442%u043E%22%2C%20%220%22%5D%2C%20%5B1%2C%20%22%u0412%u0441%u0435%u0433%u0434%u0430%22%2C%20%221%22%5D%2C%20%5B2%2C%20%22%u041D%u0438%u043A%u043E%u0433%u0434%u0430%22%2C%20%222%22%5D%5D%0A%09%7D%2C%20*/%0A%09%09%09null%2C%0A%09%7B%0A%09%09%09pref%3A%20%5B%22network.http.sendRefererHeader%22%2C%20%22Referer%20-%20%u0434%u043B%u044F%20%u0447%u0435%u0433%u043E%22%5D%2C%0A%09%09%09userChoice%3A%201%2C%0A%09%09%09values%3A%20%5B%5B0%2C%20%22%u041D%u0438%20%u0434%u043B%u044F%20%u0447%u0435%u0433%u043E%22%2C%20%220%22%5D%2C%20%5B1%2C%20%22%u0422%u043E%u043B%u044C%u043A%u043E%20%u0441%u0441%u044B%u043B%u043A%u0438%22%2C%20%221%22%5D%2C%20%5B2%2C%20%22%u0421%u0441%u044B%u043B%u043A%u0438%20%u0438%20%u0438%u0437%u043E%u0431%u0440.%22%2C%20%222%22%5D%5D%0A%20%20%7D/*%20%2C%7B%0A%09%09%09pref%3A%20%5B%22media.peerconnection.enabled%22%2C%20%22WebRTC%20%u0443%u0442%u0435%u0447%u043A%u0430%20IP%22%5D%2C%0A%09%09%09userChoice%3A%20false%0A%09%7D%20*/%0A%09%5D%3B%0A%0A%09return%20%7B%0A%09%09label%3A%20%22Quick%20toggle%22%2C%0A%09%09id%3A%20%22QuickToggleAboutConfigSettings%22%2C%0A%09%09tooltiptext%3A%20%22Quick%20toggle%20about%20preferences%22%2C%0A%09%09localized%3A%20false%2C%0A%09%09image%3A%20%22data%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFPSURBVDhPnVPNSsNAEJ5tamnBk+A7BMEcikohp/gi9i18nRafQoT00kK16tnn8CJo4vp9m5m41eSgH0zmd3d+diJ/gfdedvl0QW7k1PcLwem+3TjowZagK+Nn6yc3gNCJ+LCCh9LzzTMdqeoNbkQSFZmpJLGCW5Gx2hZaQahMbZ52VuDSfHpnAVJXOb4FKzianbzCXiLrHLYl5C3t5NTRwtxaKJxUTZ/JcOTr6q2Rxwf0aVb2/hLs4KqL3Isckz/mmSdRRksjyg+z7IM6LzDCBfuvAEOJmIKBOqAWmo1YodxLlQNsyO0rsIV/AZM+JGc2a4GgzhZ2p9mFmrpboCMqNYBDdMlwompoTWN6F2nFT5hBXb0PEpmo/Gk+oH+RrqNZINPeIlnZViV1jQuLFJQuWGB0gJdwgShvqdPXZv6J+F/QS7oXqQ9xBTFZ5oa8fAGs9fed5YhPSwAAAABJRU5ErkJggg%3D%3D%22%2C%0A%09%09onCreated%28btn%29%20%7B%0A%09%09%09btn.setAttribute%28%22image%22%2C%20this.image%29%3B%0A%09%09%09var%20doc%20%3D%20btn.ownerDocument%3B%0A%0A%09%09%09btn.btn%20%3D%20true%3B%0A%09%09%09btn.domParent%20%3D%20null%3B%0A%09%09%09btn.popups%20%3D%20new%20btn.ownerGlobal.Array%28%29%3B%0A%09%09%09this.createPopup%28doc%2C%20btn%2C%20%22primary%22%2C%20primary%29%3B%0A%09%09%09this.createPopup%28doc%2C%20btn%2C%20%22secondary%22%2C%20secondary%29%3B%0A%09%09%09this.createCloseMenusOption%28doc%2C%20btn%29%3B%0A%0A%09%09%09btn.linkedObject%20%3D%20this%3B%0A%09%09%09for%28var%20type%20of%20%5B%22command%22%2C%20%22contextmenu%22%5D%29%0A%09%09%09%09btn.setAttribute%28%22on%22%20+%20type%2C%20%60linkedObject.%24%7Btype%7D%28event%29%60%29%3B%0A%09%09%7D%2C%0A%09%09createPopup%28doc%2C%20btn%2C%20name%2C%20data%29%20%7B%0A%09%09%09var%20popup%20%3D%20doc.createElementNS%28xul_ns%2C%20%22menupopup%22%29%3B%0A%09%09%09var%20prop%20%3D%20name%20+%20%22Popup%22%3B%0A%09%09%09btn.popups.push%28btn%5Bprop%5D%20%3D%20popup%29%3B%0A%09%09%09popup.id%20%3D%20this.id%20+%20%22-%22%20+%20prop%3B%0A%09%09%09for%20%28var%20type%20of%20%5B%22popupshowing%22%2C%20%22click%22%5D%29%0A%09%09%09%09popup.setAttribute%28%22on%22%20+%20type%2C%20%60parentNode.linkedObject.%24%7Btype%7D%28event%29%60%29%3B%0A%09%09%09for%28var%20obj%20of%20data%29%20popup.append%28this.createElement%28doc%2C%20obj%29%29%3B%0A%09%09%09btn.append%28popup%29%3B%0A%09%09%7D%2C%0A%09%09map%3A%20%7Bb%3A%20%22Bool%22%2C%20n%3A%20%22Int%22%2C%20s%3A%20%22String%22%7D%2C%0A%09%09createElement%28doc%2C%20obj%29%20%7B%0A%09%09%09if%20%28%21obj%29%20return%20doc.createElementNS%28xul_ns%2C%20%22menuseparator%22%29%3B%0A%09%09%09var%20pref%20%3D%20doc.ownerGlobal.Object.create%28null%29%2C%20node%2C%20img%2C%20bool%3B%0A%09%09%09for%28var%20%5Bkey%2C%20val%5D%20of%20Object.entries%28obj%29%29%20%7B%0A%09%09%09%09if%20%28key%20%3D%3D%20%22pref%22%29%20%7B%0A%09%09%09%09%09var%20%5Bapref%2C%20lab%2C%20akey%2C%20ttt%5D%20%3D%20val%3B%0A%09%09%09%09%09pref.pref%20%3D%20apref%3B%20pref.lab%20%3D%20lab%20%7C%7C%20apref%3B%0A%09%09%09%09%09if%20%28ttt%29%20pref.ttt%20%3D%20ttt%3B%0A%09%09%09%09%7D%0A%09%09%09%09else%20if%20%28key%20%3D%3D%20%22image%22%29%20img%20%3D%20val%2C%20pref.img%20%3D%20true%3B%0A%09%09%09%09else%20if%20%28key%20%21%3D%20%22values%22%29%20pref%5Bkey%5D%20%3D%20val%3B%0A%09%09%09%09else%20pref.hasVals%20%3D%20true%3B%0A%09%09%09%7D%0A%09%09%09var%20type%20%3D%20prefs.getPrefType%28pref.pref%29%3B%0A%09%09%09var%20str%20%3D%20this.map%5Btype%20%3D%3D%20prefs.PREF_INVALID%0A%09%09%09%09%3F%20obj.values%20%3F%20%28typeof%20obj.values%5B0%5D%5B0%5D%29%5B0%5D%20%3A%20%22b%22%0A%09%09%09%09%3A%20type%20%3D%3D%20prefs.PREF_BOOL%20%3F%20%22b%22%20%3A%20type%20%3D%3D%20prefs.PREF_INT%20%3F%20%22n%22%20%3A%20%22s%22%0A%09%09%09%5D%3B%0A%09%09%09pref.get%20%3D%20prefs%5B%60get%24%7Bstr%7DPref%60%5D%3B%0A%09%09%09pref.set%20%3D%20prefs%5B%60set%24%7Bstr%7DPref%60%5D%3B%0A%0A%09%09%09node%20%3D%20doc.createElementNS%28xul_ns%2C%20%22menu%22%29%3B%0A%09%09%09node.className%20%3D%20%22menu-iconic%22%3B%0A%09%09%09node.setAttribute%28%22closemenu%22%2C%20%22none%22%29%3B%0A%09%09%09img%20%26%26%20node.setAttribute%28%22image%22%2C%20img%29%3B%0A%09%09%09akey%20%26%26%20node.setAttribute%28%22accesskey%22%2C%20akey%29%3B%0A%09%09%09%28node.pref%20%3D%20pref%29.vals%20%3D%20doc.ownerGlobal.Object.create%28null%29%3B%0A%09%09%09this.createRadios%28doc%2C%0A%09%09%09%09str.startsWith%28%22B%22%29%20%26%26%20%21pref.hasVals%20%3F%20%5B%5Btrue%2C%20%22true%22%5D%2C%20%5Bfalse%2C%20%22false%22%5D%5D%20%3A%20obj.values%2C%0A%09%09%09%09node.appendChild%28doc.createElementNS%28xul_ns%2C%20%22menupopup%22%29%29%0A%09%09%09%29%3B%0A%09%09%09if%20%28%22userChoice%22%20in%20obj%29%20pref.noAlt%20%3D%20%21%28%22userAlt%22%20in%20obj%29%3B%0A%09%09%09return%20node%3B%0A%09%09%7D%2C%0A%09%09createCloseMenusOption%28doc%2C%20btn%29%20%7B%0A%09%09%09var%20pn%20%3D%20this.closePref%20%3D%20%22QuickToggleAboutConfigSettings.closeMenus%22%3B%0A%09%09%09var%20data%20%3D%20%5Bnull%2C%20%7B%0A%09%09%09%09pref%3A%20%5Bpn%2C%20%22%u0417%u0430%u043A%u0440%u044B%u0432%u0430%u0442%u044C%20%u043C%u0435%u043D%u044E%20%u044D%u0442%u043E%u0439%20%u043A%u043D%u043E%u043F%u043A%u0438%22%5D%2C%20values%3A%20%5B%5Btrue%2C%20%22%u0414%u0430%22%5D%2C%20%5Bfalse%2C%20%22%u041D%u0435%u0442%22%5D%5D%0A%09%09%09%7D%5D%3B%0A%09%09%09var%20setCloseMenus%20%3D%20e%20%3D%3E%20%7B%0A%09%09%09%09e.stopPropagation%28%29%3B%0A%09%09%09%09var%20trg%20%3D%20e.target%2C%20%7Bpref%2C%20val%7D%20%3D%20trg%2C%20updPopup%20%3D%20true%2C%20clear%3B%0A%09%09%09%09switch%28e.type%29%20%7B%0A%09%09%09%09%09case%20%22command%22%3A%20pref%20%3D%20%28trg%20%3D%20trg.closest%28%22menu%22%29%29.pref%3B%20updPopup%20%3D%20false%3B%20break%3B%0A%09%09%09%09%09case%20%22click%22%3A%20if%20%28e.button%29%20return%3B%20break%3B%0A%09%09%09%09%09case%20%22contextmenu%22%3A%20e.preventDefault%28%29%3B%20clear%20%3D%20pref%3B%0A%09%09%09%09%7D%0A%09%09%09%09if%20%28%21pref%29%20return%3B%0A%09%09%09%09if%20%28clear%29%20prefs.clearUserPref%28pn%29%3B%0A%09%09%09%09else%20if%20%28%21updPopup%20%26%26%20val%20%3D%3D%3D%20pref.val%29%20return%3B%0A%09%09%09%09else%20pref.set%28pn%2C%20val%20%21%3D%3D%20undefined%20%3F%20val%20%3A%20%21pref.val%29%3B%0A%09%09%09%09this.upd%28trg%29%3B%0A%09%09%09%09updPopup%20%26%26%20this.popupshowing%28null%2C%20trg.querySelector%28%22menupopup%22%29%29%3B%0A%09%09%09%7D%0A%09%09%09%28this.createCloseMenusOption%20%3D%20%28doc%2C%20btn%29%20%3D%3E%20%7B%0A%09%09%09%09for%28var%20obj%20of%20data%29%0A%09%09%09%09%09btn.secondaryPopup.append%28this.createElement%28doc%2C%20obj%29%29%3B%0A%09%09%09%09var%20m%20%3D%20btn.secondaryPopup.lastChild%3B%0A%09%09%09%09m.style.cssText%20%3D%20%22fill%3A%20lightblue%20%21important%3B%20list-style-image%3A%20url%28chrome%3A//browser/skin/menu.svg%29%20%21important%3B%22%3B%0A%09%09%09%09m.setAttribute%28%22oncommand%22%2C%20%22setCloseMenus%28event%29%22%29%3B%0A%09%09%09%09m.onclick%20%3D%20m.oncontextmenu%20%3D%20m.setCloseMenus%20%3D%20setCloseMenus%3B%0A%09%09%09%7D%29%28doc%2C%20btn%29%3B%0A%09%09%7D%2C%0A%09%09UserChoiceImg%3A%20%22data%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRUlEQVR42qWTS2gTQRjH/zPJZo2BDfgkB62vYg5CjQdvRUE8WB8HKyahYotIQQOeFKGCF7EgvQlBqOCjWFKlevBRDyL4uHloLXhYqWJroaEqlETSptndGb+ZPDH0ojN8O8vA98vv+/Itw38u1nSRYRE6UhKyg4FF1R292/Q+xhhLi4TIrgjgIzwe4MbgmR2nrZMtxxEN63zYORuPZp7gzpehvCu9XjfuPmwCUHIiEtw4fK89zVvD2+FHAD56quXBpV3CVO4ret6nxHzxZxdBRuqADCKmz7RHD9y2tlmbYbBVfwE8DXBkEd/y39H5+mze8ZyoSIpsFXC9u/VE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h7H734/dPzQt9d0/CGBpCPB7nbhmwbAPVxR4+PPtsuU7/WuElth/lKORUcsoTE8TgMg0WbJaY4Zu3XKYdBrABARUk+ls4DfQAAAAASUVORK5CYII%3D%22%2C%0A%09%09upd%28node%29%20%7B%0A%09%09%09var%20%7Bpref%7D%20%3D%20node%2C%20def%20%3D%20false%2C%20user%20%3D%20false%2C%20val%3B%0A%09%09%09if%20%28prefs.getPrefType%28pref.pref%29%20%21%3D%20prefs.PREF_INVALID%29%20%7B%0A%09%09%09%09var%20pn%20%3D%20pref.pref%3B%0A%09%09%09%09try%20%7Bval%20%3D%20pref.defVal%20%3D%20db%5Bpref.get.name%5D%28pn%29%3B%20def%20%3D%20true%7D%0A%09%09%09%09catch%28ex%29%20%7Bdef%20%3D%20false%3B%7D%0A%09%09%09%09var%20user%20%3D%20prefs.prefHasUserValue%28pn%29%3B%0A%09%09%09%09if%20%28user%29%20try%20%7Bval%20%3D%20pref.get%28pn%2C%20undefined%29%3B%7D%20catch%28ex%29%20%7B%7D%0A%09%09%09%7D%0A%09%09%09if%20%28val%20%3D%3D%20pref.val%20%26%26%20def%20%3D%3D%20pref.def%20%26%26%20user%20%3D%3D%20pref.user%29%20return%3B%0A%09%09%09pref.val%20%3D%20val%3B%20pref.def%20%3D%20def%3B%20pref.user%20%3D%20user%3B%0A%09%09%09var%20exists%20%3D%20def%20%7C%7C%20user%3B%0A%0A%09%09%09var%20ttt%20%3D%20exists%20%3F%20val%20%3A%20%22%u042D%u0442%u043E%u0433%u043E%20%u043F%u0440%u0435%u0444%u0430%20%u043D%u0435%20%u0441%u0443%u0449%u0435%u0441%u0442%u0432%u0443%u0435%u0442%22%3B%0A%09%09%09if%20%28ttt%20%3D%3D%3D%20%22%22%29%20ttt%20%3D%20%22%5B%20empty_string%20%5D%22%3B%0A%09%09%09ttt%20+%3D%20%22%5Cn%22%20+%20pref.pref%3B%0A%09%09%09if%20%28pref.ttt%29%20ttt%20+%3D%20%22%5Cn%22%20+%20pref.ttt%3B%0A%09%09%09node.tooltipText%20%3D%20ttt%3B%0A%0A%09%09%09var%20img%2C%20alt%20%3D%20%22userAlt%22%20in%20pref%20%26%26%20val%20%3D%3D%20pref.userAlt%3B%0A%09%09%09if%20%28alt%29%20img%20%3D%20this.UserAltImg%3B%0A%09%09%09if%20%28%22userChoice%22%20in%20pref%29%0A%09%09%09%09if%20%28val%20%3D%3D%20pref.userChoice%29%0A%09%09%09%09%09//node.style.removeProperty%28%22color%22%29%2C%0A%09%09%09%09%09img%20%3D%20this.UserChoiceImg%3B%0A%09%09%09%09else%20%7B%0A%09%09%09%09%09//node.style.setProperty%28%22color%22%2C%20%22maroon%22%2C%20%22important%22%29%3B%0A%09%09%09%09%09if%20%28%21alt%29%20img%20%3D%20this.notUserChoiceImg%3B%0A%09%09%09%09%7D%0A%09%09%09if%20%28%21pref.img%29%20img%0A%09%09%09%09%3F%20node.setAttribute%28%22image%22%2C%20img%29%0A%09%09%09%09%3A%20node.removeAttribute%28%22image%22%29%3B%0A%09%09%09user%0A%09%09%09%09%3F%20node.style.setProperty%28%22font-style%22%2C%20%22italic%22%2C%20%22important%22%29%0A%09%09%09%09%3A%20node.style.removeProperty%28%22font-style%22%29%3B%0A%0A%09%09%09var%20%7Blab%7D%20%3D%20pref%3B%0A%09%09%09if%20%28exists%20%26%26%20pref.hasVals%29%20%7B%0A%09%09%09%09if%20%28val%20in%20pref.vals%29%20var%20sfx%20%3D%20pref.vals%5Bval%5D%20%7C%7C%20val%3B%0A%09%09%09%09else%20var%20sfx%20%3D%20user%20%3F%20%22%u0414%u0440%u0443%u0433%u043E%u0435%22%20%3A%20%22%u041F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%22%3B%0A%09%09%09%09lab%20+%3D%20%60%20%u2014%20%22%24%7Bsfx%7D%22%60%3B%0A%09%09%09%7D%0A%09%09%09node.setAttribute%28%22label%22%2C%20lab%29%3B%0A%09%09%7D%2C%0A%09%09createRadios%28doc%2C%20vals%2C%20popup%29%20%7B%0A%09%09%09for%28var%20arr%20of%20vals%29%20%7B%0A%09%09%09%09if%20%28%21arr%29%20%7B%0A%09%09%09%09%09popup.append%28doc.createElementNS%28xul_ns%2C%20%22menuseparator%22%29%29%3B%0A%09%09%09%09%09continue%3B%0A%09%09%09%09%7D%0A%09%09%09%09var%20%5Bval%2C%20lab%2C%20key%2C%20ttt%5D%20%3D%20arr%3B%0A%09%09%09%09var%20menuitem%20%3D%20doc.createElementNS%28xul_ns%2C%20%22menuitem%22%29%3B%0A%09%09%09%09menuitem.setAttribute%28%22type%22%2C%20%22radio%22%29%3B%0A%09%09%09%09menuitem.setAttribute%28%22closemenu%22%2C%20%22none%22%29%3B%0A%09%09%09%09menuitem.style.setProperty%28%22font-style%22%2C%20%22italic%22%2C%20%22important%22%29%2C%0A%09%09%09%09menuitem.setAttribute%28%22label%22%2C%20popup.parentNode.pref.vals%5Bval%5D%20%3D%20lab%29%3B%0A%09%09%09%09key%20%26%26%20menuitem.setAttribute%28%22accesskey%22%2C%20key%29%3B%0A%09%09%09%09var%20tip%20%3D%20menuitem.val%20%3D%20val%3B%0A%09%09%09%09if%20%28ttt%29%20tip%20+%3D%20%22%5Cn%22%20+%20ttt%3B%0A%09%09%09%09menuitem.tooltipText%20%3D%20tip%3B%0A%09%09%09%09popup.append%28menuitem%29%3B%0A%09%09%09%7D%0A%09%09%7D%2C%0A%09%09openPopup%28popup%29%20%7B%0A%09%09%09var%20btn%20%3D%20popup.parentNode%3B%0A%09%09%09if%20%28btn.domParent%20%21%3D%20btn.parentNode%29%20%7B%0A%09%09%09%09btn.domParent%20%3D%20btn.parentNode%3B%0A%09%09%09%09var%20pos%3B%0A%09%09%09%09if%20%28btn.matches%28%22.widget-overflow-list%20%3E%20%3Ascope%22%29%29%0A%09%09%09%09%09pos%20%3D%20%22after_start%22%3B%0A%09%09%09%09else%20var%20win%20%3D%20btn.ownerGlobal%2C%20%7Bwidth%2C%20height%2C%20top%2C%20bottom%2C%20left%2C%20right%7D%20%3D%0A%09%09%09%09%09btn.closest%28%22toolbar%22%29.getBoundingClientRect%28%29%2C%20pos%20%3D%20width%20%3E%20height%0A%09%09%09%09%09%09%3F%20%60%24%7Bwin.innerHeight%20-%20bottom%20%3E%20top%20%3F%20%22after%22%20%3A%20%22before%22%7D_start%60%0A%09%09%09%09%09%09%3A%20%60%24%7Bwin.innerWidth%20-%20right%20%3E%20left%20%3F%20%22end%22%20%3A%20%22start%22%7D_before%60%3B%0A%09%09%09%09for%28var%20p%20of%20btn.popups%29%20p.setAttribute%28%22position%22%2C%20pos%29%3B%0A%09%09%09%7D%0A%09%09%09popup.openPopup%28btn%29%3B%0A%09%09%7D%2C%0A%09%09maybeRestart%28node%2C%20conf%29%20%7B%0A%09%09%09var%20msgRest%20%3D%20%22%u041F%u0435%u0440%u0435%u0437%u0430%u043F%u0443%u0441%u0442%u0438%u0442%u044C%20%u0431%u0440%u0430%u0443%u0437%u0435%u0440%3F%22%2C%20msgAbort%20%3D%20%22%u0417%u0430%u043F%u0440%u043E%u0441%20%u043D%u0430%20%u0432%u044B%u0445%u043E%u0434%20%u043E%u0442%u043C%u0435%u043D%u0435%u043D.%22%3B%0A%09%09%09if%20%28pv%20%3E%3D%2077%29%20%7B%0A%09%09%09%09var%20title%20%3D%20node.closest%28%22toolbarbutton%22%29.label%3B%0A%09%09%09%09var%20pp%20%3D%20domWin%20%3D%3E%20Services.prompt.wrappedJSObject.pickPrompter%28%7B%0A%09%09%09%09%09domWin%2C%20modalType%3A%20Ci.nsIPrompt.MODAL_TYPE_WINDOW%0A%09%09%09%09%7D%29%3B%0A%09%09%09%09var%20confirm%20%3D%20win%20%3D%3E%20pp%28win%29.confirm%28title%2C%20msgRest%29%3B%0A%09%09%09%09var%20alert%20%3D%20win%20%3D%3E%20pp%28win%29.alert%28title%2C%20msgAbort%29%3B%0A%09%09%09%7D%20else%20%7B%0A%09%09%09%09var%20confirm%20%3D%20win%20%3D%3E%20win.confirm%28msgRest%29%3B%0A%09%09%09%09var%20alert%20%3D%20win%20%3D%3E%20win.alert%28msgAbort%29%3B%0A%09%09%09%7D%0A%09%09%09return%20%28this.mayBeRestart%20%3D%20%28node%2C%20conf%29%20%3D%3E%20%7B%0A%09%09%09%09var%20win%20%3D%20node.ownerGlobal%3B%0A%09%09%09%09if%20%28conf%20%26%26%20%21confirm%28win%29%29%20return%3B%0A%09%09%09%09if%20%28win.BrowserUtils.restartApplication%28%29%20%3D%3D%3D%20false%29%20alert%28win%29%3B%0A%09%09%09%09else%20return%20true%3B%0A%09%09%09%7D%29%28node%2C%20conf%29%3B%0A%09%09%7D%2C%0A%09%09regexpRefresh%3A%20/%5E%28%3F%3Aview-source%3A%29%3F%28%3F%3Ahttps%3F%7Cftp%29/%2C%0A%09%09maybeRe%28node%2C%20fe%29%20%7B%0A%09%09%09var%20%7Bpref%7D%20%3D%20node%3B%0A%09%09%09if%20%28%22restart%22%20in%20pref%29%20%7B%0A%09%09%09%09if%20%28this.maybeRestart%28node%2C%20pref.restart%29%29%20return%3B%0A%09%09%09%7D%0A%09%09%09else%20this.popupshowing%28fe%2C%20node.parentNode%29%3B%0A%09%09%09if%20%28%22refresh%22%20in%20pref%29%20%7B%0A%09%09%09%09var%20win%20%3D%20node.ownerGlobal%3B%0A%09%09%09%09if%20%28this.regexpRefresh.test%28win.gBrowser.currentURI.spec%29%29%20pref.refresh%0A%09%09%09%09%09%3F%20win.BrowserReloadSkipCache%28%29%20%3A%20win.BrowserReload%28%29%3B%0A%09%09%09%7D%0A%09%09%7D%2C%0A%09%09maybeClosePopup%28e%2C%20trg%29%20%7B%0A%09%09%09%21e.ctrlKey%20%26%26%20prefs.getBoolPref%28this.closePref%2C%20undefined%29%0A%09%09%09%09%26%26%20trg.parentNode.hidePopup%28%29%3B%0A%09%09%7D%2C%0A%09%09command%28e%29%20%7B%0A%09%09%09var%20trg%20%3D%20e.target%3B%0A%09%09%09if%20%28trg.btn%29%20return%20this.openPopup%28trg.primaryPopup%29%3B%0A%0A%09%09%09var%20menu%20%3D%20trg.closest%28%22menu%22%29%2C%20newVal%20%3D%20trg.val%3B%0A%09%09%09this.maybeClosePopup%28e%2C%20menu%29%3B%0A%09%09%09if%20%28newVal%20%21%3D%20menu.pref.val%29%0A%09%09%09%09menu.pref.set%28menu.pref.pref%2C%20newVal%29%2C%0A%09%09%09%09this.maybeRe%28menu%2C%20true%29%3B%0A%09%09%7D%2C%0A%09%09popupshowing%28e%2C%20trg%20%3D%20e.target%29%20%7B%0A%09%09%09if%20%28trg.state%20%3D%3D%20%22closed%22%29%20return%3B%0A%09%09%09if%20%28trg.id%29%20%7B%0A%09%09%09%09for%28var%20node%20of%20trg.children%29%20%7B%0A%09%09%09%09%09if%20%28node.nodeName.endsWith%28%22r%22%29%29%20continue%3B%0A%09%09%09%09%09this.upd%28node%29%3B%0A%09%09%09%09%09%21e%20%26%26%20node.open%20%26%26%20this.popupshowing%28null%2C%20node.querySelector%28%22menupopup%22%29%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09return%3B%0A%09%09%09%7D%0A%09%09%09var%20%7Bpref%7D%20%3D%20trg.closest%28%22menu%22%29%2C%20findChecked%20%3D%20true%3B%0A%0A%09%09%09var%20findDef%20%3D%20%22defVal%22%20in%20pref%3B%0A%09%09%09var%20checked%20%3D%20trg.querySelector%28%22%5Bchecked%5D%22%29%3B%0A%09%09%09if%20%28checked%29%20%7B%0A%09%09%09%09if%20%28checked.val%20%3D%3D%20pref.val%29%20%7B%0A%09%09%09%09%09if%20%28findDef%29%20findChecked%20%3D%20false%3B%0A%09%09%09%09%09else%20return%3B%0A%09%09%09%09%7D%0A%09%09%09%09else%20checked.removeAttribute%28%22checked%22%29%3B%0A%09%09%09%7D%0A%09%09%09if%20%28findDef%29%20%7B%0A%09%09%09%09var%20def%20%3D%20trg.querySelector%28%22menuitem%3Anot%28%5Bstyle*%3Dfont-style%5D%22%29%3B%0A%09%09%09%09if%20%28def%29%0A%09%09%09%09%09if%20%28def.val%20%3D%3D%20pref.defVal%29%20%7B%0A%09%09%09%09%09%09if%20%28findChecked%29%20findDef%20%3D%20false%3B%0A%09%09%09%09%09%09else%20return%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%09else%20def.style.setProperty%28%22font-style%22%2C%20%22italic%22%2C%20%22important%22%29%3B%0A%09%09%09%7D%0A%09%09%09for%28var%20node%20of%20trg.children%29%20if%20%28%22val%22%20in%20node%29%20%7B%0A%09%09%09%09if%20%28findChecked%20%26%26%20node.val%20%3D%3D%20pref.val%29%20%7B%0A%09%09%09%09%09node.setAttribute%28%22checked%22%2C%20true%29%3B%0A%09%09%09%09%09if%20%28findDef%29%20findChecked%20%3D%20false%3B%0A%09%09%09%09%09else%20break%3B%0A%09%09%09%09%7D%0A%09%09%09%09if%20%28findDef%20%26%26%20node.val%20%3D%3D%20pref.defVal%29%20%7B%0A%09%09%09%09%09node.style.removeProperty%28%22font-style%22%29%3B%0A%09%09%09%09%09if%20%28findChecked%29%20findDef%20%3D%20false%3B%0A%09%09%09%09%09else%20break%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%2C%0A%09%09contextmenu%28e%29%20%7B%0A%09%09%09var%20trg%20%3D%20e.target%3B%0A%09%09%09if%20%28trg.btn%29%20%7B%0A%09%09%09%09if%20%28e.ctrlKey%20%7C%7C%20e.shiftKey%29%20return%3B%0A%09%09%09%09if%20%28e.detail%20%3D%3D%202%29%20return%20trg.secondaryPopup.hidePopup%28%29%3B%0A%09%09%09%09this.openPopup%28trg.secondaryPopup%29%3B%0A%09%09%09%7D%0A%09%09%09else%20if%20%28%22pref%22%20in%20trg%29%20%7B%0A%09%09%09%09this.maybeClosePopup%28e%2C%20trg%29%3B%0A%09%09%09%09if%20%28trg.pref.user%29%0A%09%09%09%09%09prefs.clearUserPref%28trg.pref.pref%29%2C%0A%09%09%09%09%09this.maybeRe%28trg%29%3B%0A%09%09%09%7D%0A%09%09%09e.preventDefault%28%29%3B%0A%09%09%7D%2C%0A%09%09click%28e%29%20%7B%0A%09%09%09if%20%28e.button%29%20return%3B%0A%09%09%09var%20trg%20%3D%20e.target%2C%20%7Bpref%7D%20%3D%20trg%3B%0A%09%09%09if%20%28%21pref%29%20return%3B%0A%0A%09%09%09this.maybeClosePopup%28e%2C%20trg%29%3B%0A%09%09%09if%20%28%21%28%22noAlt%22%20in%20pref%29%29%20return%3B%0A%0A%09%09%09if%20%28pref.val%20%3D%3D%20pref.userChoice%29%0A%09%09%09%09if%20%28pref.noAlt%29%20return%3B%0A%09%09%09%09else%20%20pref.set%28pref.pref%2C%20pref.userAlt%29%3B%0A%09%09%09else%0A%09%09%09%09pref.set%28pref.pref%2C%20pref.userChoice%29%3B%0A%09%09%09this.maybeRe%28trg%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%7D%29%3B%0A%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5B/*CODE*/%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E
Эта кнопка по коду от моей отличается только отсутствием Mouse LongClick…
Это не совсем так.
Немного отличается метод contextmenu(), а метод click() вообще отсутствует.
То есть, хорошо бы заменить contextmenu(e) {...}, на это
... contextmenu(e) { var trg = e.target; if (trg.btn) { if (e.ctrlKey || e.shiftKey) return; if (e.detail == 2) return trg.secondaryPopup.hidePopup(); this.openPopup(trg.secondaryPopup); } else if ("pref" in trg) { this.maybeClosePopup(e, trg); if (trg.pref.user) prefs.clearUserPref(trg.pref.pref), this.maybeRe(trg); } e.preventDefault(); }, click(e) { if (e.button) return; var trg = e.target, {pref} = trg; if (!pref) return; this.maybeClosePopup(e, trg); if (!("noAlt" in pref)) return; if (pref.val == pref.userChoice) if (pref.noAlt) return; else pref.set(pref.pref, pref.userAlt); else pref.set(pref.pref, pref.userChoice); this.maybeRe(trg); },
Уточню, для QuickToggleSettings все варианты не нужны! Наиболее удобный, это убрать подсказку совсем или переделать, чтобы её текст был строкой с ключевым словом. А текст, начинающийся НЕ с ключевого слова, запускать как строку кода.
Выделить кодКод:
values: [ ["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "TOOLTIP после ключевого слова - текст подсказки", "custombuttons.setPrefs("network.proxy.type", 2)"], нет ключевого слова TOOLTIP, значит выполнить эту строку как Java-код.
Полезное уточнение, только какое-то слегка ин-валидное.
Описание не соответствует коду.
И вообще, зачем трогать подсказку? Не проще ли так:
если в массиве есть пятый элемент — значит это строка кода,
и нужно «выполнить эту строку как Java-код».
Что-то типа такого
/* pref.set = prefs[`set${str}Pref`]; */ var map, set = prefs[`set${str}Pref`]; if (pref.hasVals) { for(var [val, , , , code] of obj.values) code && (map || (map = new Map())).set(val, code); if (map) pref.set = (key, val) => { set(key, val); map.has(val) && eval(map.get(val)); } } if (!map) pref.set = set;
ещё хотелка для QuickToggleSettings
Что за странная тяга напихать в одну кнопку всего побольше.
Там и так уже лис ногу сломит. Сделай себе такую отдельную,
большого труда, полагаю, не составит.
Отсутствует
если в массиве есть пятый элемент — значит это строка кода,
Конечно, так лучше, чем анализировать элементы массива!
Немного отличается метод contextmenu(), а метод click() вообще отсутствует.
Но ведь в мою кнопку click не нужен? В ней только mousedown(e) {…
Что за странная тяга напихать в одну кнопку всего побольше.
Там и так уже лис ногу сломит. Сделай себе такую отдельную,
Я и хотел проще - по левому клику открывать меню настроек, а по правому простое меню, где каждый пункт запускается сразу!
Dumby - исправил кнопку, но код в пятом элементе массива не запускается:
["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Надёжный доступ на заблокированные сайты\n\nУстановите «Настройки прокси» = 2" , "e.view.alert('JS CODE');"]
// Quick Toggle https://forum.mozilla-russia.org/viewtopic.php?pid=784139#p784139 // https://forum.mozilla-russia.org/viewtopic.php?pid=784165#p784165 // Быстрое переключение параметров about:config // LongClick не срабатывает второй раз, сначала нужно открыть меню (async (name, id, func) => { if (name == "Object") return CustomizableUI.createWidget(func()); var win = name == "Window", g = Components.utils.import("resource://gre/modules/Services.jsm", {}); if (g[id]) {if (win) return;} else g[id] = func(); if (win) return CustomizableUI.createWidget(g[id]); addDestructor(r => r[5] == "e" && delete g[id]); g[id].onCreated(this); })(this.constructor.name, "QuickToggleAboutConfigSettingsUCF", () => { var {prefs} = Services, db = prefs.getDefaultBranch(""); var pv = parseInt(Services.appinfo.platformVersion); var xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; //===================================================================================== // refresh: // false - reload current tab // true - reload current tab skip cache // // restart: // false - restart browser // true - restart browser with confirm var primary = [{ pref: ["network.proxy.autoconfig_url", "Прокси (VPN) URL"], userChoice: 0, userAlt: 1, refresh: true, values: [ ["127.0.0.1", "отключен…", "0"], ["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Надёжный доступ на заблокированные сайты\n\nУстановите «Настройки прокси» = 2", "e.view.alert('JS CODE');"], [prefs.getStringPref("user.pacfile", "file:///etc/proxy.pac"), "user .pac файл", "2"], ["https://git.io/ac-anticensority-pac", "ac-anticensority", "3"], ["localhost", "Tor Browser", "4"] ]},{ pref: ["network.proxy.type", "Режим прокси"], userChoice: 0, userAlt: 2, refresh: true, values: [ [0, "Без прокси", "0", "по-умолчанию"], [5, "Системные (из IE)", "5"], [2, "URL автонастройки", "2", "about:config — user.pacfile"], [1, "Ручная настройка", "1", "вторая строка"], [4, "Автоопределение", "4"] ]},{ pref: ["network.proxy.share_proxy_settings", "Прокси для всех протоколов"], userChoice: true, refresh: true, values: [[true, "Да", "", "Прокси для всех протоколов при ручной настройке"], [false, "Нет"]] },{ pref: ["network.trr.mode", "DNS через HTTPS"], userChoice: 2, userAlt: 0, refresh: true, values: [ [0, "Выключен", "0"], [2, "TRR + мой", "2"], [3, "только TRR", "3"] ]},null,{ pref: ["permissions.default.image", "Разрешить загрузку изображений"], userChoice: 1, userAlt: 3, refresh: true, values: [[1, "Да"], [3, "Только с сайта"], [2, "Нет"]] },{ pref: ["image.animation_mode", "Анимация изображений"], userChoice: "none", refresh: true, values: [["none", "Выключена"], ["normal", "Включена"], ["once", "Единожды"]] },{ pref: ["browser.display.use_document_fonts", "Загружать web-шрифты"], userChoice: 1, refresh: true, values: [[1, "Да"], [0, "Нет"]] },null,{ pref: ["media.autoplay.default", "Авто-play аудио/видео"], userChoice: 5, refresh: true, values: [ [0, "Разрешить", "0"], [1, "Запретить", "1"], [2, "Спрашивать", "2"], [5, "Блокировать", "5"] ]},{ pref: ["media.autoplay.blocking_policy", "Автозапуск (политика)"], userChoice: 1, userAlt: 2, refresh: true, values: [ [1, "Временная", "1"], [2, "По действию", "2"], [0, "Постоянная", "0"] ]},{ pref: ["plugin.state.flash", "Flash-plugin"], userChoice: 2, refresh: true, values: [ [2, "Всегда включать", "2"], [1, "Включать по запросу", "1"], [0, "Никогда не включать", "0"] ]},null,{ pref: ["network.cookie.cookieBehavior", "Cookies"], userChoice: 1, userAlt: 3, refresh: false, values: [ [1, "Не принимать сторонние"], [3, "Не принимать с не посещенных"], [4, "Не принимать от трекеров"], [2, "Не принимать со всех"], [0, "Принимать со всех"] ]},{ pref: ["javascript.enabled", "Выполнять скрипты Java"], userChoice: true, refresh: true, values: [[true, "Да"], [false, "Нет"]] },null,{ pref: ["dom.storage.enabled", "Локальное хранилище"], userChoice: true } ]; //===================================================================================== var secondary = [{ pref: ["dom.enable_performance", "Статус загрузки страницы"], userChoice: false },{ pref: ["browser.display.document_color_use", "Использовать цвета сайтов"], userChoice: 0, values: [[0, "Авто", "0"], [1, "Всегда", "1"], [2, "Никогда", "2"]] },{ pref: ["intl.accept_languages", "Язык для веб-страниц"], userChoice: "ru-RU, ru, en-US, en", values: [["chrome://global/locale/intl.properties", "По-умолчанию"], ["en-US, en, ru-RU, ru", "Английская локаль"], ["ru-RU, ru, en-US, en", "Русская локаль"]] },null,{ pref: ["network.http.sendRefererHeader", "Referer - для чего"], userChoice: 1, values: [[0, "Ни для чего", "0"], [1, "Только ссылки", "1"], [2, "Ссылки и изобр.", "2"]] },{ pref: ["media.peerconnection.enabled", "WebRTC утечка IP"], userChoice: false },{ pref: ["gfx.webrender.all", "WebRender для всего"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] },{ pref: ["media.webm.enabled", "Декодер WebM VP8"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] } ]; return { label: "Quick Toggle Settings", id: "QuickToggleAboutConfigSettings", tooltiptext: "Quick Toggle Settings\n ЛКМ ПКМ", localized: false, image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFPSURBVDhPnVPNSsNAEJ5tamnBk+A7BMEcikohp/gi9i18nRafQoT00kK16tnn8CJo4vp9m5m41eSgH0zmd3d+diJ/gfdedvl0QW7k1PcLwem+3TjowZagK+Nn6yc3gNCJ+LCCh9LzzTMdqeoNbkQSFZmpJLGCW5Gx2hZaQahMbZ52VuDSfHpnAVJXOb4FKzianbzCXiLrHLYl5C3t5NTRwtxaKJxUTZ/JcOTr6q2Rxwf0aVb2/hLs4KqL3Isckz/mmSdRRksjyg+z7IM6LzDCBfuvAEOJmIKBOqAWmo1YodxLlQNsyO0rsIV/AZM+JGc2a4GgzhZ2p9mFmrpboCMqNYBDdMlwompoTWN6F2nFT5hBXb0PEpmo/Gk+oH+RrqNZINPeIlnZViV1jQuLFJQuWGB0gJdwgShvqdPXZv6J+F/QS7oXqQ9xBTFZ5oa8fAGs9fed5YhPSwAAAABJRU5ErkJggg==", onCreated(btn) { btn.setAttribute("image", this.image); var doc = btn.ownerDocument; btn.btn = true; btn.domParent = null; btn.popups = new btn.ownerGlobal.Array(); this.createPopup(doc, btn, "primary", primary); this.createPopup(doc, btn, "secondary", secondary); this.createCloseMenusOption(doc, btn); btn.linkedObject = this; for(var type of ["command", "contextmenu", "mousedown"]) btn.setAttribute("on" + type, `linkedObject.${type}(event)`); }, createPopup(doc, btn, name, data) { var popup = doc.createElementNS(xul_ns, "menupopup"); var prop = name + "Popup"; btn.popups.push(btn[prop] = popup); popup.id = this.id + "-" + prop; for (var type of ["popupshowing", "click"]) popup.setAttribute("on" + type, `parentNode.linkedObject.${type}(event)`); for(var obj of data) popup.append(this.createElement(doc, obj)); btn.append(popup); }, map: {b: "Bool", n: "Int", s: "String"}, createElement(doc, obj) { if (!obj) return doc.createElementNS(xul_ns, "menuseparator"); var pref = doc.ownerGlobal.Object.create(null), node, img, bool; for(var [key, val] of Object.entries(obj)) { if (key == "pref") { var [apref, lab, akey, ttt] = val; pref.pref = apref; pref.lab = lab || apref; if (ttt) pref.ttt = ttt; } else if (key == "image") img = val, pref.img = true; else if (key != "values") pref[key] = val; else pref.hasVals = true; } var type = prefs.getPrefType(pref.pref); var str = this.map[type == prefs.PREF_INVALID ? obj.values ? (typeof obj.values[0][0])[0] : "b" : type == prefs.PREF_BOOL ? "b" : type == prefs.PREF_INT ? "n" : "s" ]; pref.get = prefs[`get${str}Pref`]; /* pref.set = prefs[`set${str}Pref`]; */ var map, set = prefs[`set${str}Pref`]; if (pref.hasVals) { for(var [val, , , , code] of obj.values) code && (map || (map = new Map())).set(val, code); if (map) pref.set = (key, val) => { set(key, val); map.has(val) && eval(map.get(val)); // выполнить код } } if (!map) pref.set = set; node = doc.createElementNS(xul_ns, "menu"); node.className = "menu-iconic"; node.setAttribute("closemenu", "none"); img && node.setAttribute("image", img); akey && node.setAttribute("accesskey", akey); (node.pref = pref).vals = doc.ownerGlobal.Object.create(null); this.createRadios(doc, str.startsWith("B") && !pref.hasVals ? [[true, "true"], [false, "false"]] : obj.values, node.appendChild(doc.createElementNS(xul_ns, "menupopup")) ); if ("userChoice" in obj) pref.noAlt = !("userAlt" in obj); return node; }, createCloseMenusOption(doc, btn) { var pn = this.closePref = "QuickToggleAboutConfigSettings.closeMenus"; var data = [null, { pref: [pn, "Закрывать меню этой кнопки"], values: [[true, "Да"], [false, "Нет"]] }]; var setCloseMenus = e => { e.stopPropagation(); var trg = e.target, {pref, val} = trg, updPopup = true, clear; switch(e.type) { case "command": pref = (trg = trg.closest("menu")).pref; updPopup = false; break; case "click": if (e.button) return; break; case "contextmenu": e.preventDefault(); clear = pref; } if (!pref) return; if (clear) prefs.clearUserPref(pn); else if (!updPopup && val === pref.val) return; else pref.set(pn, val !== undefined ? val : !pref.val); this.upd(trg); updPopup && this.popupshowing(null, trg.querySelector("menupopup")); } (this.createCloseMenusOption = (doc, btn) => { for(var obj of data) btn.secondaryPopup.append(this.createElement(doc, obj)); var m = btn.secondaryPopup.lastChild; m.style.cssText = "fill: lightblue !important; list-style-image: url(chrome://browser/skin/menu.svg) !important;"; m.setAttribute("oncommand", "setCloseMenus(event)"); m.onclick = m.oncontextmenu = m.setCloseMenus = setCloseMenus; })(doc, btn); }, UserChoiceImg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRUlEQVR42qWTS2gTQRjH/zPJZo2BDfgkB62vYg5CjQdvRUE8WB8HKyahYotIQQOeFKGCF7EgvQlBqOCjWFKlevBRDyL4uHloLXhYqWJroaEqlETSptndGb+ZPDH0ojN8O8vA98vv+/Itw38u1nSRYRE6UhKyg4FF1R292/Q+xhhLi4TIrgjgIzwe4MbgmR2nrZMtxxEN63zYORuPZp7gzpehvCu9XjfuPmwCUHIiEtw4fK89zVvD2+FHAD56quXBpV3CVO4ret6nxHzxZxdBRuqADCKmz7RHD9y2tlmbYbBVfwE8DXBkEd/y39H5+mze8ZyoSIpsFXC9u/VE3/ldpyg5AAMEoJMTQi2hANKBgyKdy0h/eoChqcf9MimvVAHjd/fdiG0NRwgQpDAp1agBpDZwdHKJLKZzc+h5e3kCSexh5c5j8fmhW0HGpNZXFkqfsQpAKgcFKGmAlAxHXp5bkkmsrhosjh4cCIJ5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zNMV5ZyN1ISlZYZl9/TE1tjuMSFgA1VWO8uef+FAqG47tpFMcm7dyFyIOEzBMlfCadao5qhk39l9P479evwFbiOcRSXKueAAAAABJRU5ErkJggg==", UserAltImg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIfSURBVDhPpVM9b9NQFD02cSKKFVGKIFFREFsmFiCA1AEQQrQjC0gssLCkC0jJj0iFWFoGdiT4Ay0SEmJBhPI5FBokikL4SCC0Te2UxInt13Mdu1CVrVc6713fe86x/T6w09DCeTNKJ7Q0pzyUmoCmZYOiUhXms8RMcd6vB7UwthhM5fTLWix2L3PmYjKdOwdz9DDFGtr1KuovnqD29JGlfO9Goew9DCV/DaZy2pXE8PD9Y/mbupk6xE6cVWPQhEujHo2+4fXdO76ztnq1UPYfSCcwKB1HWjeMyunCraSZOsDqbkBPsBOTNoMGvkOTLto/f+F56bble262OK/qesiYzIydTJojFLjrgEe4bcIOEdXWYe6LITN2KgmFSRFGBuPpo0eAngX0SexTJHD5LOgLpEZTcgKuUuMijAyy5l7+r0NSb21g5LQI5gGYSy2AjYBLjQyRAUniTnJXsBoayBzm3RBBndwwIoOK3fgNdIREQYCV/0DqLdiNZqCRITKYayx85RfQuUNiZ3k7IgO+vfGeXGpkiAyma++WLHtZhZ8o5H/FEVpos1V7u8TFwLQId8nw+Afa51Oq2vyycmlk9KCW0GXFZeu63IUO8z88Bx5s28SbuUXfddzrxVcobxpI0GTh7H734/dPzQt9d0/CGBpCPB7nbhmwbAPVxR4+PPtsuU7/WuElth/lKORUcsoTE8TgMg0WbJaY4Zu3XKYdBrABARUk+ls4DfQAAAAASUVORK5CYII=", upd(node) { var {pref} = node, def = false, user = false, val; if (prefs.getPrefType(pref.pref) != prefs.PREF_INVALID) { var pn = pref.pref; try {val = pref.defVal = db[pref.get.name](pn); def = true} catch(ex) {def = false;} var user = prefs.prefHasUserValue(pn); if (user) try {val = pref.get(pn, undefined);} catch(ex) {} } if (val == pref.val && def == pref.def && user == pref.user) return; pref.val = val; pref.def = def; pref.user = user; var exists = def || user; var ttt = exists ? val : "Этого префа не существует"; if (ttt === "") ttt = "[ empty_string ]"; ttt += "\n" + pref.pref; if (pref.ttt) ttt += "\n" + pref.ttt; node.tooltipText = ttt; var img, alt = "userAlt" in pref && val == pref.userAlt; if (alt) img = this.UserAltImg; if ("userChoice" in pref) if (val == pref.userChoice) //node.style.removeProperty("color"), img = this.UserChoiceImg; else { //node.style.setProperty("color", "maroon", "important"); if (!alt) img = this.notUserChoiceImg; } if (!pref.img) img ? node.setAttribute("image", img) : node.removeAttribute("image"); user ? node.style.setProperty("font-style", "italic", "important") : node.style.removeProperty("font-style"); var {lab} = pref; if (exists && pref.hasVals) { if (val in pref.vals) var sfx = pref.vals[val] || val; else var sfx = user ? "Другое" : "По умолчанию"; lab += ` — "${sfx}"`; } node.setAttribute("label", lab); }, createRadios(doc, vals, popup) { for(var arr of vals) { if (!arr) { popup.append(doc.createElementNS(xul_ns, "menuseparator")); continue; } var [val, lab, key, ttt] = arr; var menuitem = doc.createElementNS(xul_ns, "menuitem"); menuitem.setAttribute("type", "radio"); menuitem.setAttribute("closemenu", "none"); menuitem.style.setProperty("font-style", "italic", "important"), menuitem.setAttribute("label", popup.parentNode.pref.vals[val] = lab); key && menuitem.setAttribute("accesskey", key); var tip = menuitem.val = val; if (ttt) tip += "\n" + ttt; menuitem.tooltipText = tip; popup.append(menuitem); } }, openPopup(popup) { var btn = popup.parentNode; if (btn.domParent != btn.parentNode) { btn.domParent = btn.parentNode; var pos; if (btn.matches(".widget-overflow-list > :scope")) pos = "after_start"; else var win = btn.ownerGlobal, {width, height, top, bottom, left, right} = btn.closest("toolbar").getBoundingClientRect(), pos = width > height ? `${win.innerHeight - bottom > top ? "after" : "before"}_start` : `${win.innerWidth - right > left ? "end" : "start"}_before`; for(var p of btn.popups) p.setAttribute("position", pos); } popup.openPopup(btn); }, maybeRestart(node, conf) { var msgRest = "Перезапустить браузер?", msgAbort = "Запрос на выход отменен."; if (pv >= 77) { var title = node.closest("toolbarbutton").label; var pp = domWin => Services.prompt.wrappedJSObject.pickPrompter({ domWin, modalType: Ci.nsIPrompt.MODAL_TYPE_WINDOW }); var confirm = win => pp(win).confirm(title, msgRest); var alert = win => pp(win).alert(title, msgAbort); } else { var confirm = win => win.confirm(msgRest); var alert = win => win.alert(msgAbort); } return (this.mayBeRestart = (node, conf) => { var win = node.ownerGlobal; if (conf && !confirm(win)) return; if (win.BrowserUtils.restartApplication() === false) alert(win); else return true; })(node, conf); }, regexpRefresh: /^(?:view-source:)?(?:https?|ftp)/, maybeRe(node, fe) { var {pref} = node; if ("restart" in pref) { if (this.maybeRestart(node, pref.restart)) return; } else this.popupshowing(fe, node.parentNode); if ("refresh" in pref) { var win = node.ownerGlobal; if (this.regexpRefresh.test(win.gBrowser.currentURI.spec)) pref.refresh ? win.BrowserReloadSkipCache() : win.BrowserReload(); } }, maybeClosePopup(e, trg) { !e.ctrlKey && prefs.getBoolPref(this.closePref, undefined) && trg.parentNode.hidePopup(); }, command(e) { var trg = e.target; if (trg.btn) return this.openPopup(trg.primaryPopup); var menu = trg.closest("menu"), newVal = trg.val; this.maybeClosePopup(e, menu); if (newVal != menu.pref.val) menu.pref.set(menu.pref.pref, newVal), this.maybeRe(menu, true); }, popupshowing(e, trg = e.target) { if (trg.state == "closed") return; if (trg.id) { for(var node of trg.children) { if (node.nodeName.endsWith("r")) continue; this.upd(node); !e && node.open && this.popupshowing(null, node.querySelector("menupopup")); } return; } var {pref} = trg.closest("menu"), findChecked = true; var findDef = "defVal" in pref; var checked = trg.querySelector("[checked]"); if (checked) { if (checked.val == pref.val) { if (findDef) findChecked = false; else return; } else checked.removeAttribute("checked"); } if (findDef) { var def = trg.querySelector("menuitem:not([style*=font-style]"); if (def) if (def.val == pref.defVal) { if (findChecked) findDef = false; else return; } else def.style.setProperty("font-style", "italic", "important"); } for(var node of trg.children) if ("val" in node) { if (findChecked && node.val == pref.val) { node.setAttribute("checked", true); if (findDef) findChecked = false; else break; } if (findDef && node.val == pref.defVal) { node.style.removeProperty("font-style"); if (findChecked) findDef = false; else break; } } }, contextmenu(e) { var trg = e.target; if (trg.btn) { if (e.ctrlKey || e.shiftKey) return; if (e.detail == 2) return trg.secondaryPopup.hidePopup(); this.openPopup(trg.secondaryPopup); } else if ("pref" in trg && trg.pref.user) prefs.clearUserPref(trg.pref.pref), this.maybeRe(trg, true); e.preventDefault(); }, mousedown(e) { var reset = e => e.target.linkedObject = this; var id, lo = {command: reset, mousedown: reset}; var lin = e.view.AppConstants.platform == "linux"; var stop = e => reset(e) && e.preventDefault(); lo.contextmenu = lin ? e => e.ctrlKey || e.shiftKey ? dsp(e) : stop(e) : stop; var context = lin ? e => e.button == 2 && e.type.endsWith("p") && this.contextmenu(e) : () => {}; var dsp = (e, timeout) => { var trg = e.target; trg.onmouseup = trg.onmouseleave = null; if (timeout) return this.londPress(e); e.view.clearTimeout(id); reset(e); context(e); } (this.mousedown = e => { var trg = e.target; if (!trg.btn) return; trg.linkedObject = lo; trg.onmouseup = trg.onmouseleave = dsp; id = e.view.setTimeout(dsp, 500, e, true); })(e); }, londPress(e) { // удержание кнопки мыши, выбирать команды, отводящие мышь от кнопки var msg = "QuickSettings\nLONG PRESS: e.button = " + e.button; // Components.utils.reportError(msg); e.view.alert(msg); } }; });
Отредактировано Dobrov (25-03-2021 11:32:16)
Отсутствует
Но ведь в мою кнопку click не нужен?
Как это не нужен?
Вот здесь, в методе createPopup(), посредством установки атрибута "onclick",
задаётся обработчик события "click", который пробрасывает event в метод click()
... createPopup(doc, btn, name, data) { ... for (var type of ["popupshowing", "click"]) popup.setAttribute("on" + type, `parentNode.linkedObject.${type}(event)`); ... },
исправил кнопку, но код в пятом элементе массива не запускается
Как это не запускается?
Когда я жму на menuitem «АнтиЗапрет (1)», в консоли прявляется запись
«Uncaught ReferenceError: e is not defined».
Значит код запускается.
Отсутствует
Dumby
Так это не моя кнопка. Точнее я не просил делать мне кнопку с кучей команд и функций. Я же говорил, что кнопка CB которая у меня, она не работает после обновления на версию 69.0.3 и просил решить вопрос с запуском её.
Код который я разместил в своём первом сообщении его можно подправить?
Я указал код скопировал его из вкладки Инициализация, а ваш код который мне предложили он другого вида для URL, вот у меня тоже есть такой же код начинающийся с custombutton:// я не знал, что его нужно было разместить, поэтому скопировал из Инициализации. Тогда я тоже размещу код для URL
custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname%3EQuick%20toggle%20for%20about%3Aconfig%20preferences%20%5BFix%21%5D%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAACXBIWXMAAABnAAAAZwHVKNQmAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBA3y7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BUMDVQYqg4jIKAX08EGIIUByaVEZhMXIwMDAoM2Qw7CDkY8xi/EskynTYmYR5i4WFpZGVibWNjYetmnsyuybOVw5bnIWcHFyLeV24n7E08KrwXuOr4xfnv+0QIWguuANoS5hO+EvIqtFU8TkxW6Jz5AIlxSXvCE1RzpBRk3mrexWuXp5LwUxhSeKm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Cinitcode%3E%3C%21%5BCDATA%5B//%20%u0411%u044B%u0441%u0442%u0440%u043E%u0435%20%u043F%u0435%u0440%u0435%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u0435%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%20about%3Aconfig%20%u043E%u0442%2024.07.2016%0Athis._handleClick%3D%28%29%3D%3EmenuPopup.openPopup%28this%2C%22after_start%22%29%3Bvar%20menuPopup%3Dself.appendChild%28document.createElement%28%22menupopup%22%29%29%3BmenuPopup.id%3D%27quick-aboutconfig-menupopup%27%3B%0A//%20%u0418%u0437%u043C%u0435%u043D%u0438%u0442%u044C%20%u0438%u043A%u043E%u043D%u043A%u0443%20%u043F%u0440%u0438%20%u043D%u0435%u0441%u043E%u043E%u0442%u0432%u0435%u0442%u0441%u0442%u0432%u0438%u0435%20%u043B%u044E%u0431%u043E%u0433%u043E%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u0430%20%u043F%u043E%u043B%u044C%u0437%u043E%u0432%u0430%u0442%u0435%u043B%u044C%u0441%u043A%u043E%u043C%u0443%20%u043F%u0440%u0435%u0434%u043F%u043E%u0447%u0442%u0435%u043D%u0438%u044E%20%28%u0441%u043C.%u043D%u0438%u0436%u0435%29%7C%7C%u0418%u043A%u043E%u043D%u043A%u0430%20%u043C%u0435%u043D%u044F%u0435%u0442%u0441%u044F%20%u0442%u043E%u043B%u044C%u043A%u043E%20%u043F%u0440%u0438%20%u0438%u0437%u043C%u0435%u043D%u0435%u0438%u0438%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%20%u0447%u0435%u0440%u0435%u0437%20%u043C%u0435%u043D%u044E%20%u043A%u043D%u043E%u043F%u043A%u0438%2C%20%u043B%u0438%u0431%u043E%20%u043F%u043E%u0441%u043B%u0435%20%u0435%u0433%u043E%20%u043E%u0442%u043A%u0440%u044B%u0442%u0438%u044F.%0A%20%20var%20s%3D%27CB.hasNotUserChoice%27%3Bfunction%20toggleImage%28%29%7Bvar%20val%3Dcustombuttons.getPrefs%28s%29%3Bself.image%3Dval%0A//var%20s%3D%27CB.hasNotUserChoice%27%3Bfunction%20toggleImage%28%29%7Bcustombuttons.getPrefs%28s%29%3F%20%20%20%20%20%20%20%20self.style.cssText%3D%27%27%3Aself.style.cssText%3D%27filter%3Agrayscale%28100%25%29%27%3B%7D%3B%0A%3F%20%27data%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB6klEQVQ4jZWTv2tUQRDHv8ntd28GLLQQfwS5VkuDSgRF/wlRiIiCQQQhhZ1VII1/wDUWkkLTBAsbC0FJYZGQ3NuZRcHYW6UQEQzoeXkW791xXh5CptodZr8z85kd4BBWRJwDgB5wyoCjh3mLbfK8C/ddW11XJlduNgYaeTFpvJWA0+P+BBx3Cf2sLEy5m4WrS8A0AGANaBUSrgKAKzdcY5k0PF4HJGm47NK6nSUMXOIXAEgSrrnG0oU/AGDKNb6qHe9c+Ms1lqbxqws/uoTfWVp3ksRll/DTJM6bcMWEn1KbDysBCW+zsnSNpWssTbg3PNf3uw7MuHDgym8uoW8aX496SxKXs7J0iTsFObcGRBfey8rShP1EXthSnDHhShJ0vM0H1uYiAKBSHWZqLYyDc+H7sSpeNlMX9l1jWWebEAgjgSxcbRRYB46YhCcVxH9bqDP3nbyUBB0XPk+Cjgnvj1qoqohvJqDtTUBdcGAmSzgIEQBM2R0fY/U41GPkwNpcTBKfmnDPNN4w4TOX+NnbfAQAWAKmXcMVAMgaNqrM1UfqkbMmrXkT/nGJO1XF4Xod8/0Ak4KcKzTe3AROjPs/AMdM2M8atk25a8IXAKYawTZZj5jNEvZN2TVldg3Ny/RfkYizALAFnByu819tzvCRWXKqTwAAAABJRU5ErkJggg%3D%3D%27%0A%3A%20%27data%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAACXBIWXMAAABnAAAAZw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IpJTRAAAAIGNIUk0AAHolAACAgwAA+f8AAIDoAABSCAABFVgAADqXAAAXb9daH5AAAAEOSURBVHjabJGtS0MBFMXPJojBMMPwC1nV6FCZoGj/ZVGYiIJDBOEFm3XFP2DFIAu6ZrAYBM0OREEUnN20ICI40OfbsTzYB48b7oF74J4PWUnDjMU4GSv5PEubCo/UuwjMs8FEjLOEPNCkRloWAyxb3GEOGWKRTSLeLFYwXyLFBeaGH8w7z/yyRZlvilR5YV+kuMYY04r3NpNEfBByaYksZUyDAoPsYELmmKJKjj0CS0QYU4rl3WLMeceRCBMItW7CMEd9LxbIcUqOXQJLFld9Iks9Ii0qPTYjAo5pscYJrxzIIs1SV1B5ivzRsFjFfHaiLrDOaIxHCLmnyRmp5LLytKnw1FNWH2XaYoyM9T8AOvnw3YUOg90AAAAASUVORK5CYII%3D%27%3B%7D%3B%0AtoggleImage%28%29%3BServices.prefs.addObserver%28s%2CtoggleImage%2Cfalse%29%3BaddDestructor%28%28%29%3D%3EServices.prefs.removeObserver%28s%2CtoggleImage%29%29%3B%0A%0A//%20nodeName%3A%20menuitem%20-%20%u0434%u043B%u044F%20%u043B%u043E%u0433%u0438%u0447%u0435%u0441%u043A%u0438%u0445%28boolean%29%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%2C%20menu%20-%20%u0434%u043B%u044F%20%u0446%u0435%u043B%u044B%u0445%28integer%29%20%u0438%20%u0441%u0442%u0440%u043E%u043A%u043E%u0432%u044B%u0445%28string%29.%20menuseparator%20-%20%u0434%u043B%u044F%20%u0440%u0430%u0437%u0434%u0435%u043B%u0438%u0442%u0435%u043B%u044F.%0A//%20pref%20-%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%20about%3Aconfig.%0A//%20%u041F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u044B%20%u0438%u043C%u0435%u044E%u0449%u0438%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u044F%20%u043E%u0442%u043B%u0438%u0447%u043D%u044B%u0435%20%u043E%u0442%20%u0434%u0435%u0444%u043E%u043B%u0442%u043D%u044B%u0445%20-%20%u0432%u044B%u0434%u0435%u043B%u0435%u043D%u044B%20%u0436%u0438%u0440%u043D%u044B%u043C%20%u0441%u0442%u0438%u043B%u0435%u043C%20%u0442%u0435%u043A%u0441%u0442%u0430.%0A//%20restart%20%28%u0437%u0430%u0434%u0430%u0432%u0430%u0442%u044C%20%u0441%20%u043F%u0443%u0441%u0442%u044B%u043C%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%u043C.%20%u0442.%u0435.%2C%20restart%3A%20%22%22%29%20-%20%u0434%u043E%u0431%u0430%u0432%u043B%u044F%u0435%u0442%20%u0432%u043E%u0437%u043C%u043E%u0436%u043D%u043E%u0441%u0442%u044C%20%u043F%u0435%u0440%u0435%u0437%u0430%u043F%u0443%u0441%u043A%u0430%20%u0431%u0440%u0430%u0443%u0437%u0435%u0440%u0430%0A//%20%28%u0441%20%u043F%u043E%u0434%u0442%u0432%u0435%u0440%u0436%u0434%u0435%u043D%u0438%u0435%u043C%20%u0432%20%u0434%u0438%u0430%u043B%u043E%u0433%u043E%u0432%u043E%u043C%20%u043E%u043A%u043D%u0435%29%20%u043F%u043E%u0441%u043B%u0435%20%u0438%u0437%u043C%u0435%u043D%u0435%u043D%u0438%u044F%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u0430.%0A//%20key%20-%20%u0437%u0430%u0434%u0430%u0435%u0442%20accesskey%20-%20%u043A%u043B%u0430%u0432%u0438%u0448%u0438%20%u0434%u043B%u044F%20%u0431%u044B%u0441%u0442%u0440%u043E%u0439%20%u043D%u0430%u0432%u0438%u0433%u0430%u0446%u0438%u0438%20%u043F%u043E%20%u043C%u0435%u043D%u044E.%0A//%20userChoice%20-%20%u0437%u0430%u0434%u0430%u0435%u0442%20%u043F%u0440%u0435%u0434%u043F%u043E%u0447%u0438%u0442%u0430%u0435%u043C%u043E%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%20%u0438%20%u0435%u0441%u043B%u0438%20%u0442%u0435%u043A%u0443%u0449%u0435%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%20%u0441%20%u043D%u0438%u043C%20%u043D%u0435%20%u0441%u043E%u0432%u043F%u0430%u0434%u0430%u0435%u0442%2C%20%u043F%u0443%u043D%u043A%u0442%20%u043C%u0435%u043D%u044E/%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u0435%20%u043C%u0435%u043D%u044E%20%u043F%u043E%u043C%u0435%u0447%u0430%u044E%u0442%u0441%u044F%20%u043A%u0440%u0430%u0441%u043D%u044B%u043C%20%u0446%u0432%u0435%u0442%u043E%u043C.%0A//%20%u0422%u0430%u043A%u0436%u0435%20%u043C%u043E%u0436%u043D%u043E%20%u0443%u0441%u0442%u0430%u043D%u043E%u0432%u0438%u0442%u044C%20%u043F%u0440%u0435%u0434%u0443%u043F%u0440%u0435%u0436%u0434%u0430%u044E%u0449%u0443%u044E%20%u0438%u043A%u043E%u043D%u043A%u0443%20%u0434%u043B%u044F%20%u0442%u0430%u043A%u0438%u0445%20%u043F%u0443%u043D%u043A%u0442%u043E%u0432.%20%u0421%u043C.%20%u0441%u0442%u0438%u043B%u044C%20%u0432%20%u043F%u043E%u0441%u0442%u0435%20%u043A%u043A%u043D%u043E%u043F%u043A%u0438.%0A//%20%u0410%20%u0442%u0430%u043A%u0436%u0435%20%u043C%u0435%u043D%u044F%u0435%u0442%u0441%u044F%20%u0438%u043A%u043E%u043D%u043A%u0430%20%u0441%u0430%u043C%u043E%u0439%20%u043A%u043D%u043E%u043F%u043A%u0438%20%28%u0441%u043C.%20%u0432%u044B%u0448%u0435%29.%0A//%20strValues%20-%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u044F%20%u0438%20%u043E%u0442%u043E%u0431%u0440%u0430%u0436%u0430%u0435%u043C%u043E%u0435%20%u0432%20%u043C%u0435%u043D%u044E%20%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u044F.%20%u0417%u0430%u0434%u0430%u0432%u0430%u0442%u044C%20%u0434%u043B%u044F%20%u0446%u0435%u043B%u044B%u0445%28integer%29%20%u0438%20%u0441%u0442%u0440%u043E%u043A%u043E%u0432%u044B%u0445%28string%29%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432.%0A//%20%u0417%u0430%u0434%u0430%u0435%u0442%u0441%u044F%20%u0432%20%u0432%u0438%u0434%u0435%3A%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%2C%2C%2C%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u0435%2C%2C%2Caccesskey%7C%7C%7C%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u04352%2C%2C%2C%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u04352%2C%2C%2Caccesskey2%7C%7C%7C%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u04353%2C%2C%2C%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u04353%20%u0438%20%u0442.%u0434.%20%28accesskey%20-%20%u0437%u0430%u0434%u0430%u0435%u0442%u0441%u044F%20%u043E%u043F%u0446%u0438%u043E%u043D%u0430%u043B%u044C%u043D%u043E%29%0A//%20%u041F%u043E%u043B%u043D%u043E%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%20%u043E%u0442%u043E%u0431%u0440%u0430%u0436%u0430%u0435%u0442%u0441%u044F%20%u0432%20%u043F%u043E%u0434%u0441%u043A%u0430%u0437%u043A%u0430%u0445%2C%20%u043F%u0440%u0438%20%u043D%u0430%u0432%u0435%u0434%u0435%u043D%u0438%u0438%20%u043D%u0430%20%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u0435%20%u043F%u043E%u0434%u043C%u0435%u043D%u044E/%u043F%u0443%u043D%u043A%u0442%20%u043F%u043E%u0434%u043C%u0435%u043D%u044E.%0A//%20%u0414%u043B%u044F%20%u043B%u043E%u0433%u0438%u0447%u0435%u0441%u043A%u0438%u0445%28boolean%29%20-%20%u043E%u0442%u043E%u0431%u0440%u0430%u0436%u0430%u0435%u0442%u0441%u044F%20%u0441%u0440%u0430%u0437%u0443%20%u043F%u043E%u0441%u043B%u0435%20%u0441%u0430%u043C%u043E%u0433%u043E%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u0430%20%28%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%20true%20-%20%u0442%u0430%u043A%u0436%u0435%20%u0441%u0442%u0430%u0432%u0438%u0442%20%u0433%u0430%u043B%u043E%u0447%u043A%u0443%20%u0434%u043B%u044F%20%u043D%u0435%u0433%u043E%29.%0A//%20%u041B%u041A%u041C%20%u043F%u043E%20%u043F%u0443%u043D%u043A%u0442%u0430%u043C%20%u043C%u0435%u043D%u044E%20-%20%u043F%u0435%u0440%u043A%u043B%u044E%u0447%u0430%u0435%u0442%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u044F%20%u0434%u043B%u044F%20%u043B%u043E%u0433%u0438%u0447%u0435%u0441%u043A%u0438%u0445%28boolean%29%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%2C%0A//%20%u043B%u044E%u0431%u0430%u044F%20%u043A%u043D%u043E%u043F%u043A%u0430%20%u043F%u043E%20%u043F%u0443%u043D%u043A%u0442%u0430%u043C%20%u0432%20%u0441%u0443%u0431%u043C%u0435%u043D%u044E%20-%20%u0437%u0430%u0434%u0430%u0435%u0442%20%u044D%u0442%u043E%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%20%u0434%u043B%u044F%20%u0446%u0435%u043B%u044B%u0445%28integer%29%20%u0438%20%u0441%u0442%u0440%u043E%u043A%u043E%u0432%u044B%u0445%28string%29%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432.%0A//%20%u041F%u041A%u041C%20%u043F%u043E%20%u043F%u0443%u043D%u043A%u0442%u0430%u043C%20%u043C%u0435%u043D%u044E%20%u0438%20%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u044E%20%u0441%u0443%u0431%u043C%u0435%u043D%u044E%20-%20%u0441%u0431%u0440%u0430%u0441%u044B%u0432%u0430%u0435%u0442%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u0430%20%u0432%20%u0434%u0435%u0444%u043E%u043B%u0442%u043D%u043E%u0435.%0A//%20%u041A%u043B%u0430%u0432%u0438%u0430%u0442%u0443%u0440%u0430%3A%20Enter%20-%20%u043F%u0435%u0440%u0435%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u0435%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u0430.%0A//%20%u0421%u043F%u0435%u0446%u043A%u043B%u0430%u0432%u0438%u0448%u0430%20%u0432%u044B%u0437%u043E%u0432%u0430%20%u043A%u043E%u043D%u0442%u0435%u043A%u0441%u0442%u043D%u043E%u0433%u043E%20%u043C%u0435%u043D%u044E%20/%20Shift+Enter%20-%20%u0441%u0431%u0440%u043E%u0441%20%u0432%20%u0434%u0435%u0444%u043E%u043B%u0442%u043D%u043E%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435.%0A//%20Alt%20+%20M%20-%20%u043E%u0442%u043A%u0440%u044B%u0442%u044C%20%u043C%u0435%u043D%u044E%20%u043A%u043D%u043E%u043F%u043A%u0438.%20%28%u0421%u043E%u0447%u0435%u0442%u0430%u043D%u0438%u0435%20%u043C%u043E%u0436%u043D%u043E%20%u0441%u043C%u0435%u043D%u0438%u0442%u044C%20%u043D%u0430%20%u0441%u0432%u043E%u0435.%20%u0421%u043C.%20%u0432%20%u043A%u043E%u043D%u0446%u0435%20%u043A%u043E%u0434%u0430%29%0A%5B%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22%u041E%u0442%u043A%u043B.%20%u0434%u0438%u0441%u043A%u043E%u0432%u043E%u0433%u043E%20%u043A%u044D%u0448%u0430%22%2C%20pref%3A%22browser.cache.disk.enable%22%2C%20userChoice%3A%22false%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22%u041E%u0442%u043A%u043B.%20%u043A%u044D%u0448%u0430%20%u0432%20%u043E%u043F%u0435%u0440%u0430%u0442%u0438%u0432%u043D%u043E%u0439%20%u043F%u0430%u043C%u044F%u0442%u0438%22%2C%20pref%3A%22browser.cache.memory.enable%22%2C%20userChoice%3A%22false%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22%u041E%u0442%u043A%u043B.%20%u043B%u043E%u043A%u0430%u043B%u044C%u043D%u043E%u0433%u043E%20%u0445%u0440%u0430%u043D%u0438%u043B%u0438%u0449%u0430%20DB%20%28Storage%29%22%2C%20pref%3A%22dom.indexedDB.enabled%22%2C%20key%3A%27d%27%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22%u041E%u0442%u043A%u043B.%20%u043B%u043E%u043A%u0430%u043B%u044C%u043D%u043E%u0433%u043E%20%u0445%u0440%u0430%u043D%u0438%u043B%u0438%u0449%u0430%22%2C%20pref%3A%22dom.storage.enabled%22%2C%20key%3A%27s%27%7D%2C%0A%20%20//%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20name%3A%22Back-story-cash%20%5BTessssttt%5D%22%2C%20pref%3A%22browser.sessionhistory.max_total_viewers%22%2C%20strValues%3A%220%2C%2C%2C0%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20pref%3A%22image.animation_mode%22%2C%20key%3A%27i%27%2C%20userChoice%3A%22none%22%2C%20strValues%3A%22normal%2C%2C%2C%u0410%u043D%u0438%u043C%u0430%u0446%u0438%u044F%20%u043A%u0430%u0440%u0442%u0438%u043D%u043E%u043A%20%u0432%u043A%u043B.%2C%2C%2C%7C%7C%7Cnone%2C%2C%2C%u0410%u043D%u0438%u043C%u0430%u0446%u0438%u044F%20%u043A%u0430%u0440%u0442%u0438%u043D%u043E%u043A%20%u0432%u044B%u043A%u043B.%2C%2C%2C%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20pref%3A%22network.cookie.cookieBehavior%22%2C%20key%3A%27k%27%2C%20userChoice%3A%221%22%2C%20strValues%3A%222%2C%2C%2C%u041D%u0435%20%u043F%u0440%u0438%u043D%u0438%u043C%u0430%u0442%u044C%20%u043A%u0443%u043A%u0438%20%u0441%20%u0441%u0430%u0439%u0442%u043E%u0432%2C%2C%2C%7C%7C%7C0%2C%2C%2C%u041F%u0440%u0438%u043D%u0438%u043C%u0430%u0442%u044C%20%u043A%u0443%u043A%u0438%20%u0441%u043E%20%u0441%u0442%u043E%u0440%u043E%u043D%u043D%u0438%u0445%20%u0441%u0430%u0439%u0442%u043E%u0432%20%u0432%u0441%u0435%u0433%u0434%u0430%2C%2C%2C%7C%7C%7C3%2C%2C%2C%u041F%u0440%u0438%u043D%u0438%u043C%u0430%u0442%u044C%20%u043A%u0443%u043A%u0438%20%u0441%u043E%20%u0441%u0442%u043E%u0440%u043E%u043D%u043D%u0438%u0445%20%u043F%u043E%u0441%u0435%u0449%u0451%u043D%u043D%u044B%u0445%20%u0441%u0430%u0439%u0442%u043E%u0432%2C%2C%2C%7C%7C%7C1%2C%2C%2C%u041F%u0440%u0438%u043D%u0438%u043C%u0430%u0442%u044C%20%u043A%u0443%u043A%u0438%20%u0441%u043E%20%u0441%u0442%u043E%u0440%u043E%u043D%u043D%u0438%u0445%20%u0441%u0430%u0439%u0442%u043E%u0432%20%u043D%u0438%u043A%u043E%u0433%u0434%u0430%2C%2C%2C%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20pref%3A%22general.useragent.locale%22%2C%20key%3A%27l%27%2C%20restart%3A%22%22%2C%20strValues%3A%22en-US%2C%2C%2CEnglish%2C%2C%2Ce%7C%7C%7Cru%2C%2C%2C%u0420%u0443%u0441%u0441%u043A%u0438%u0439%2C%2C%2Cr%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20name%3A%22language%22%2C%20pref%3A%22intl.accept_languages%22%2C%20strValues%3A%22en-US%2C%20en%3Bq%3D0.5%2C%2C%2Cen-US%2C%20en%3Bq%3D0.5%2C%2C%2Ce%7C%7C%7Cen-US%2C%20en%2C%20ru-RU%2C%20ru%2C%2C%2Cen-US%2C%20en%2C%20ru-RU%2C%20ru%2C%2C%2Cr%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20pref%3A%22browser.display.document_color_use%22%2C%20key%3A%27c%27%2C%20userChoice%3A%220%22%2C%20strValues%3A%220%2C%2C%2CAutomatic%2C%2C%2C0%7C%7C%7C1%2C%2C%2CAlways%2C%2C%2C1%7C%7C%7C2%2C%2C%2CNever%2C%2C%2C2%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20pref%3A%22CB.TEST%22%2C%20key%3A%27t%27%2C%20userChoice%3A%22C%3A%5C%5CDownloads%5C%5CTEST1%22%2C%20strValues%3A%22C%3A%5C%5CDownloads%5C%5CTEST1%2C%2C%2CTEST1%2C%2C%2C1%7C%7C%7CC%3A%5C%5CDownloads%5C%5CTEST2%2C%2C%2CTEST2%2C%2C%2C2%22%7D%0A%20%20//%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22%u041E%u0442%u043A%u043B.%20%u0438%u043D%u0444%u0443%20%u043D%u0430%u0447%u0430%u043B%u043E/%u043A%u043E%u043D%u0435%u0446%20%u0437%u0430%u0433%u0440%u0443%u0437%u043A%u0438%20%u0441%u0442%u0440%22%2C%20pref%3A%22dom.enable_performance%22%2C%20userChoice%3A%22false%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20name%3A%22%u0412%u043A%u043B/%u0412%u044B%u043A%u043B%20Referer%22%2C%20pref%3A%22network.http.sendRefererHeader%22%2C%20strValues%3A%220%2C%2C%2C0%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22%u0412%20%u043A%u0430%u0447%u0435%u0441%u0442%u0432%u0435%20%u0440%u0435%u0444%u0435%u0440%u0435%u0440%u0430%20%u043A%u043E%u0440%u0435%u043D%u044C%20%u0441%u0430%u0439%u0442%u0430%22%2C%20pref%3A%22network.http.referer.spoofSource%22%2C%20userChoice%3A%22true%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20name%3A%22referer.trimmingPolicy%22%2C%20pref%3A%22network.http.referer.trimmingPolicy%22%2C%20strValues%3A%222%2C%2C%2C2%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20name%3A%22On/Off%20Image%22%2C%20pref%3A%22permissions.default.image%22%2C%20userChoice%3A1%2C%20strValues%3A%222%2C%2C%2COff%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22On/Off%20Multiprocessing%22%2C%20pref%3A%22browser.tabs.remote.autostart%22%2C%20restart%3A%22%22%2C%20userChoice%3A%22true%22%7D%2C%20%20%20//about%3Asupport%3DMultiprocess%20Windows%7Cforum.ru-board.com/topic.cgi%3Fforum%3D5%26topic%3D49695%26start%3D0%26limit%3D1%26m%3D9%231%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20//opennet.ru/opennews/art.shtml%3Fnum%3D50691%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20name%3A%22On/Off%20javascript%22%2C%20pref%3A%22javascript.enabled%22%2C%20key%3A%27j%27%2C%20userChoice%3A%22true%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20pref%3A%22dom.workers.enabled%22%2C%20key%3A%27w%27%2C%20userChoice%3A%22false%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20pref%3A%22media.autoplay.enabled%22%2C%20key%3A%27m%27%2C%20userChoice%3A%22false%22%7D%2C%0A%20%20//%7BnodeName%3A%22menu%22%2C%20name%3A%22Stopautoplay%22%2C%20pref%3A%22media.autoplay.default%22%2C%20userChoice%3A0%2C%20strValues%3A%220%2C%2C%2CStop%2C%2C%2C0%7C%7C%7C1%2C%2C%2CPlay%2C%2C%2C1%22%7D%2C%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20pref%3A%22xpinstall.signatures.required%22%7D%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20//Check%20is%20compatibility%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20pref%3A%22browser.bookmarks.autoExportHTML%22%7D%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20//BookmarksHtml%20%5Bfalse%3Dplaces.sqlite%5D%0A%20%20//%7BnodeName%3A%22menuitem%22%2C%20pref%3A%22media.peerconnection.enabled%22%7D%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20//WebRTC%20false%3Doff%21%0A%0A%0A%20%20%7BnodeName%3A%22menuitem%22%2C%20name%3A%22On/Off%20useragentS%22%2C%20pref%3A%22general.useragent.site_specific_overrides%22%2C%20userChoice%3A%22true%22%7D%2C%0A%20%20%7BnodeName%3A%22menuitem%22%2C%20name%3A%22On/Off%20media.play-stand-alone%22%2C%20pref%3A%22media.play-stand-alone%22%7D%2C%20%20%20//%u0441%u0440%u0430%u0437%u0443%20%u0441%u043A%u0430%u0447%u0438%u0432%u0430%u0442%u044C%20%u043C%u0435%u0434%u0438%u0430%u0444%u0430%u0439%u043B%u044B%2C%20%u0431%u0435%u0437%20%u043F%u0435%u0440%u0435%u0445%u043E%u0434%u0430%20%u043D%u0430%20%u043D%u043E%u0432%u0443%u044E%20%u0441%u0442%u0440%u0430%u043D%u0438%u0446%u0443.%0A%20%20%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20%7BnodeName%3A%22menu%22%2C%20pref%3A%22general.useragent.locale%22%2C%20key%3A%27l%27%2C%20restart%3A%22%22%2C%20strValues%3A%22en-US%2C%2C%2CEnglish%2C%2C%2Ce%7C%7C%7Cru%2C%2C%2C%u0420%u0443%u0441%u0441%u043A%u0438%u0439%2C%2C%2Cr%22%7D%2C%0A%20%20%7BnodeName%3A%22menu%22%2C%20name%3A%22language%22%2C%20pref%3A%22intl.accept_languages%22%2C%20strValues%3A%22en-US%2C%20en%3Bq%3D0.5%2C%2C%2Cen-US%2C%20en%3Bq%3D0.5%2C%2C%2Ce%7C%7C%7Cen-US%2C%20en%2C%20ru-RU%2C%20ru%2C%2C%2Cen-US%2C%20en%2C%20ru-RU%2C%20ru%2C%2C%2Cr%22%7D%2C%0A%20%20%7BnodeName%3A%22menuseparator%22%7D%2C%0A%20%20%7BnodeName%3A%22menu%22%2C%20name%3A%22Configure%20Proxies%22%2C%20pref%3A%22network.proxy.type%22%2C%20userChoice%3A5%2C%20strValues%3A%221%2C%2C%2ChttpP%2C%2C%2C1%7C%7C%7C2%2C%2C%2CAutomaticP%2C%2C%2C2%7C%7C%7C5%2C%2C%2CUse%20systemP%2C%2C%2C5%22%7D%2C%0A%20%20%7BnodeName%3A%22menu%22%2C%20name%3A%22AutomaticP%22%2C%20pref%3A%22network.proxy.autoconfig_url%22%2C%20strValues%3A%22file%3A///X%3A/FFQ/_.pac%2C%2C%2Cfile%3A///X%3A/FFQ/_.pac%2C%2C%2C1%7C%7C%7Chttps%3A//antizapret.prostovpn.org/proxy.pac%2C%2C%2Chttps%3A//antizapret.prostovpn.org/proxy.pac%2C%2C%2C2%22%7D%2C%0A%20%20%7BnodeName%3A%22menuseparator%22%7D%2C%20%0A%20%20%0A%20%20//userChoice%3A%22Mozilla/5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X%2010.13%3B%20rv%3A57.0%29%20Gecko/20100101%20Firefox/99.0%22%2C%0A%20%20%7BnodeName%3A%22menu%22%2C%20name%3A%22User%20Agent%22%2C%20pref%3A%22general.useragent.override%22%2C%20key%3A%27u%27%2C%20strValues%3A%22Mozilla/5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X%2010.13%3B%20rv%3A60.0%29%20Gecko/20100101%20Firefox/60.0%2C%2C%2CFirefox%2060/MacOSX%2010.13%7C%7C%7CMozilla/5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X%2010_13_5%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/66.0.3359.181%20Safari/537.36%2C%2C%2CChrome%2066/MacOSX%2010.13.5%7C%7C%7CMozilla/5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X%2010_11_6%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/57.0.2987.133%20Safari/537.36%2C%2C%2CChrome%2057/MacOSX%7C%7C%7CMozilla/5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X%2010_12_4%29%20AppleWebKit/603.1.30%20%28KHTML%2C%20like%20Gecko%29%20Version/10.1%20Safari/603.1.30%2C%2C%2CSafari%20Generic/MacOSX%7C%7C%7CMozilla/5.0%20%28Windows%20NT%206.1%3B%20WOW64%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/57.0.2987.133%20Safari/537.36%2C%2C%2CChrome57/W7%7C%7C%7COpera/9.80%20%28Windows%20NT%206.2%3B%20Win64%3B%20x64%29%20Presto/2.12%20Version/12.16%2C%2C%2COpera12/W8%7C%7C%7CMozilla/5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/61.0.3163.98%20Safari/537.36%2C%2C%2CChrome61/W10%7C%7C%7CMozilla/5.0%20%28Linux%3B%20Android%207.0%3B%20PLUS%20Build/NRD90M%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/61.0.3163.98%20Mobile%20Safari/537.36%2C%2C%2CChrome61/Android7%7C%7C%7CMozilla/5.0%20%28compatible%3B%20Googlebot/2.1%3B%20+http%3A//www.google.com/bot.html%29%2C%2C%2CGoogleBot%7C%7C%7CMozilla/5.0%20%28compatible%3B%20YandexBot/3.0%3B%20+http%3A//yandex.com/bots%29%2C%2C%2CYandexBot%7C%7C%7CMozilla/5.0%20%28compatible%3B%20Yahoo%21%20Slurp%3B%20http%3A//help.yahoo.com/help/us/ysearch/slurp%29%2C%2C%2CYahooBot%7C%7C%7CMozilla/5.0%20%28compatible%3B%20bingbot/2.0%3B%20+http%3A//www.bing.com/bingbot.htm%29%2C%2C%2CBingBot%7C%7C%7CDuckDuck%20bot/1.0%3B%20%28+http%3A//duckduckgo.com/duckduckbot.html%29%2C%2C%2CDuckDuckBot%7C%7C%7CMozilla/5.0%20%28compatible%3B%20Baiduspider/2.0%3B%20+http%3A//www.baidu.com/search/spider.html%29%2C%2C%2CBaiduspiderBot%7C%7C%7Cia_archiver%20%28+http%3A//www.alexa.com/site/help/webmasters%3B%20crawler@alexa.com%29%2C%2C%2CAlexaCrawlerBot%7C%7C%7CMozilla/5.0%20%28Linux%3B%20Android%205.1.1%3B%20SM-G928X%20Build/LMY47X%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/47.0.2526.83%20Mobile%20Safari/537.36%2C%2C%2CSamsung%20Galaxy%20S6%20Edge%20Plus%7C%7C%7CMozilla/5.0%20%28Windows%20Phone%2010.0%3B%20Android%204.2.1%3B%20Microsoft%3B%20Lumia%20950%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/46.0.2486.0%20Mobile%20Safari/537.36%20Edge/13.10586%2C%2C%2CMicrosoft%20Lumia%20950%7C%7C%7CMozilla/5.0%20%28Windows%20Phone%2010.0%3B%20Android%204.2.1%3B%20Xbox%3B%20Xbox%20One%29%20AppleWebKit/537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome/46.0.2486.0%20Mobile%20Safari/537.36%20Edge/13.10586%2C%2C%2CXbox%20One%7C%7C%7CMozilla/5.0%20%28PlayStation%204%203.11%29%20AppleWebKit/537.73%20%28KHTML%2C%20like%20Gecko%29%2C%2C%2CPlaystation%204%7C%7C%7C%2C%2C%2C%u041F%u0443%u0441%u0442%u043E%u0435%20%u0437%u043D%u0430%u0447%u0435%u043D%u0438%u0435%22%7D%2C%0A%5D.forEach%28function%28m%29%7Bvar%20mItem%3Ddocument.createElement%28m.nodeName%29%3Bvar%20browserRestart%3D%27%27%3B%0Aif%20%28%22restart%22%20in%20m%29%20browserRestart%3D%27%20if%20%28custombuttons.confirmBox%28null%2C%20%22Restart%3F%22%2C%20%22Yes%22%2C%20%22Cancel%22%29%29%20Services.startup.quit%28Services.startup.eAttemptQuit%20%7C%20Services.startup.eRestart%29%3B%27%3B%0Aif%20%28%22name%22%20in%20m%29%20mItem.setAttribute%28%27name%27%2Cm.name%29%3Bif%20%28%22pref%22%20in%20m%29%20%7BmItem.setAttribute%28%27closemenu%27%2C%27none%27%29%3B%0AmItem.setAttribute%28%27oncontextmenu%27%2C%27event.preventDefault%28%29%3Bcustombuttons.clearPrefs%28%22%27+m.pref+%27%22%29%3B%27+browserRestart%29%3B%7D%0Aif%20%28%22key%22%20in%20m%29%20mItem.setAttribute%28%27accesskey%27%2C%20m.key%29%3Bif%20%28m.nodeName%3D%3D%3D%22menuitem%22%29%20%7BmItem.setAttribute%28%27type%27%2C%27checkbox%27%29%3B%0AmItem.setAttribute%28%27oncommand%27%2C%27custombuttons.setPrefs%28%22%27+m.pref+%27%22%2C%21custombuttons.getPrefs%28%22%27+m.pref+%27%22%29%29%3Bif%20%28event.shiftKey%20%26%26%20event.keyCode%3D%3Devent.DOM_VK_RETURN%29%7Bevent.preventDefault%28%29%3Bcustombuttons.clearPrefs%28%22%27+m.pref+%27%22%29%7D%3B%27+browserRestart%29%3B%7D%0Aif%20%28m.nodeName%3D%3D%3D%22menu%22%29%7BmItem.setAttribute%28%27class%27%2C%27menu-iconic%27%29%3B%0A%0Avar%20subMenu%3DmItem.appendChild%28document.createElement%28%22menupopup%22%29%29%3B%0A%0Afor%20%28var%20value%20of%20m.strValues.split%28%27%7C%7C%7C%27%29%29%7Bvar%20submItem%3Ddocument.createElement%28%22menuitem%22%29%3Bvar%20smVal%3Dvalue.split%28%27%2C%2C%2C%27%29%5B0%5D%3B%0Avar%20smValConv%3DconvertFromUnicode%28%22UTF-8%22%2CsmVal%29%3Bvar%20smName%3Dvalue.split%28%27%2C%2C%2C%27%29%5B1%5D%3Bvar%20key%3Dvalue.split%28%27%2C%2C%2C%27%29%5B2%5D%3B%0A%0Akey%20%26%26%20submItem.setAttribute%28%27accesskey%27%2Ckey%29%3BsubmItem.setAttribute%28%27type%27%2C%27radio%27%29%3BsubmItem.setAttribute%28%27label%27%2CsmName%29%3BsubmItem.setAttribute%28%27tooltiptext%27%2CsmVal%29%3BsubmItem.setAttribute%28%27closemenu%27%2C%27none%27%29%3B%0AsubmItem.setAttribute%28%27oncommand%27%2C%27try%7Bcustombuttons.setPrefs%28%22%27+m.pref+%27%22%2C%22%27+smValConv.replace%28/%5C%5C/g%2C%27%5C%5C%5C%5C%27%29+%27%22%29%7Dcatch%28e%29%7BServices.prefs.setIntPref%28%22%27+m.pref+%27%22%2C%22%27+smValConv+%27%22%29%7D%3B%27+browserRestart%29%3B%0AsubMenu.appendChild%28submItem%29%3B%7D%7D%0A%0AmenuPopup.appendChild%28mItem%29%3B%0A%0A%20%20//%20%u041B%u0438%u0441%u0442%u0435%u043D%u0435%u0440%u044B%20%u043E%u0442%u0441%u043B%u0435%u0436%u0438%u0432%u0430%u044E%u0449%u0438%u0435%20%u043F%u0435%u0440%u0435%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u0435%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%0A%20%20//%20%u0438%20%u0443%u0441%u0442%u0430%u043D%u0430%u0432%u043B%u0438%u0432%u0430%u044E%u0449%u0438%u0435%20%u0441%u043E%u043E%u0442%u0432%u0435%u0442%u0441%u0442%u0432%u0443%u044E%u0449%u0438%u0435%20%u043D%u0430%u0437%u0432%u0430%u043D%u0438%u044F%20%u0438%20%u0447%u0435%u043A%u0431%u043E%u043A%u0441%u044B%20%u0434%u043B%u044F%20%u043F%u0443%u043D%u043A%u0442%u043E%u0432%20%u043C%u0435%u043D%u044E%20%u043F%u0440%u0438%20%u043E%u0442%u043A%u0440%u044B%u0442%u0438%u0438%20%u043C%u0435%u043D%u044E%20%u0438%20%u043A%u043B%u0438%u043A%u0430%u0445%0A%20%20for%20%28var%20type%20of%20%5B%27command%27%2C%27popupshowing%27%2C%27contextmenu%27%5D%29%7BaddEventListener%28type%2C%28e%29%3D%3E%7BsetTimeout%28%28%29%3D%3E%7Bif%20%28%22pref%22%20in%20m%29%7Bvar%20val%2Cdef%3B%0A%20%20%20def%3DServices.prefs.prefHasUserValue%28m.pref%29%3B%0A%20%20%20try%20%7Bval%3DServices.prefs.getComplexValue%28m.pref%2CCi.nsISupportsString%29.data%3B%7D%20catch%28e%29%20%7B%0A%20%20%20if%20%28Services.prefs.getPrefType%28m.pref%29%3D%3D64%29%20val%3Dcustombuttons.getPrefs%28m.pref%29.toString%28%29%3Belse%20val%3Dcustombuttons.getPrefs%28m.pref%29%3B%7D%0A%20%20%20def%20%3F%20mItem.style.setProperty%28%27font-weight%27%2C%20%27bold%27%2C%20%27important%27%29%20%3A%20mItem.style.removeProperty%28%27font-weight%27%29%3B%7D%0A%0A%20%20%20%20%20if%20%28m.nodeName%3D%3D%3D%27menuitem%27%29%7BmItem.setAttribute%28%27checked%27%2Cval%29%3BmItem.label%3D%28mItem.hasAttribute%28%27name%27%29%20%3F%20mItem.getAttribute%28%27name%27%29%20%3A%20m.pref%29+%27%20-%20%22%27+val+%27%22%27%3B%0A%20%20%20%20%20if%20%28%22userChoice%22%20in%20m%29%7Btry%20%7Bvar%20usrChc%3D%28val.toString%28%29%3D%3D%3Dm.userChoice%29%7D%20catch%28e%29%20%7BusrChc%3Dfalse%7D%3B%0A%0A%20%20%20%20%20mItem.setAttribute%28%27user-choice%27%2CusrChc%29%3BusrChc%20%3F%20mItem.style.removeProperty%28%27color%27%29%20%3A%20mItem.style.setProperty%28%27color%27%2C%27orangered%27%2C%27important%27%29%3B%7D%7D%0A%20%20%20%20%20if%20%28subMenu%29%7Bfor%20%28var%20smitem%20of%20subMenu.getElementsByTagName%28%27menuitem%27%29%29%20%7Bvar%20smval%3Dsmitem.getAttribute%28%27tooltiptext%27%29%3Bsmitem.setAttribute%28%27checked%27%2C%28val%3D%3D%3Dsmval%29%20%3F%20true%20%3A%20false%29%3B%7D%7D%0A%20%20%20%20%20if%20%28m.nodeName%3D%3D%3D%22menu%22%29%20%7Bvar%20vname%3B%0A%20%20%20%20%20try%20%7Bvname%3DsubMenu.getElementsByAttribute%28%27checked%27%2C%27true%27%29%5B0%5D.getAttribute%28%27label%27%29%3B%7D%20catch%28e%29%20%7Bif%20%28%21Services.prefs.prefHasUserValue%28m.pref%29%29%20vname%3D%27Default%27%3Belse%20vname%3D%27Other%27%3B%7D%0A%0A%20%20%20%20%20mItem.setAttribute%28%27label%27%2C%28mItem.hasAttribute%28%27name%27%29%20%3F%20mItem.getAttribute%28%27name%27%29%20%3A%20m.pref%29+%27%20-%20%22%27+vname+%27%22%27%29%3B%0A%20%20%20%20%20mItem.setAttribute%28%27tooltiptext%27%2Cval%20%7C%7C%20%27This%20preferences%20has%20null%20value%20or%20does%20not%20exist.%27%29%3B%0A%0A%20%20%20%20%20if%20%28%22userChoice%22%20in%20m%29%20%7Bvar%20smUsrChc%3D%28val%3D%3D%3Dm.userChoice.toString%28%29%29%3BmItem.setAttribute%28%27user-choice%27%2CsmUsrChc%29%3B%0A%20%20%20%20%20smUsrChc%20%3F%20mItem.style.removeProperty%28%27color%27%29%20%3A%20mItem.style.setProperty%28%27color%27%2C%27orangered%27%2C%27important%27%29%3B%7D%7D%0A%0A%20%20%20%20%20if%20%28%22userChoice%22%20in%20m%29%20%7Bvar%20hasNotUserChoice%3DmenuPopup.getElementsByAttribute%28%27user-choice%27%2C%27false%27%29%5B0%5D%3Bcustombuttons.setPrefs%28s%2ChasNotUserChoice%20%3F%20true%20%3A%20false%29%3B%7D%7D%2C%200%29%7D%2Cfalse%2CmenuPopup%29%7D%7D%29%3B%0A%0A//%20%u041B%u0438%u0441%u0442%u0435%u043D%u0435%u0440%20%u043F%u043E%u0437%u0432%u043E%u043B%u044F%u044E%u0449%u0438%u0439%20%u0441%u0431%u0440%u043E%u0441%20%u043F%u0430%u0440%u0430%u043C%u0435%u0442%u0440%u043E%u0432%20%u0441%20%u0441%u0443%u0431%u043C%u0435%u043D%u044E%20%u043F%u043E%20Shift%20+%20Enter%7C%7C%u0417%u0430%20%u043A%u043E%u0434%20%u0441%u043F%u0430%u0441%u0438%u0431%u043E%20Dumby%0AaddEventListener%28%22popupshown%22%2C%7BhandleEvent%3A%20function%28e%29%7Bthis%5Be.type%5D%28e%29%3B%7D%2C%0Apopupshown%3A%20function%28e%29%20%7Bif%20%28e.target%21%3DmenuPopup%29%20return%3BmenuPopup.addEventListener%28%22popuphidden%22%2C%20this%2C%20false%29%3Bwindow.addEventListener%28%22keydown%22%2C%20this%2C%20true%29%3B%7D%2C%0Apopuphidden%3A%20function%28e%29%20%7Bif%20%28e.target%21%3DmenuPopup%29%20return%3BmenuPopup.removeEventListener%28%22popuphidden%22%2C%20this%2C%20false%29%3Bwindow.removeEventListener%28%22keydown%22%2C%20this%2C%20true%29%3B%7D%2C%0Apopupshowing%3A%20function%28e%29%20%7Be.target.parentNode.removeEventListener%28%22popupshowing%22%2C%20this%2C%20false%29%3Be.preventDefault%28%29%3B%7D%2Cget%20old%28%29%20%7Bdelete%20this.old%3B%0Athis.e%20%3D%20new%20MouseEvent%28%22contextmenu%22%2C%20%7B%7D%29%3Breturn%20this.old%3DparseInt%28Services.appinfo.platformVersion%29%20%3C%2025%3B%7D%2Cget%20prop%28%29%20%7Bdelete%20this.prop%3B%0Aif%20%28%22key%22%20in%20KeyboardEvent.prototype%29%20this.prop%20%3D%20%22key%22%2C%20this.val%3D%22Enter%22%3Belse%20this.prop%20%3D%20%22keyCode%22%2C%20this.val%3DKeyboardEvent.DOM_VK_RETURN%3Breturn%20this.prop%3B%7D%2C%0Akeydown%3A%20function%28e%29%20%7Bif%20%28%21e.shiftKey%20%7C%7C%20e.ctrlKey%20%7C%7C%20e.altKey%20%7C%7C%20e%5Bthis.prop%5D%20%21%3D%20this.val%29%20return%3Bvar%20target%3DmenuPopup.querySelector%28%22menu%5B_moz-menuactive%5D%3Anot%28%5Bopen%5D%29%22%29%3B%0Aif%20%28%21target%29%20return%3Bthis.old%20%3F%20target.addEventListener%28%22popupshowing%22%2C%20this%2C%20false%29%20%3A%20e.stopPropagation%28%29%3Btarget.dispatchEvent%28this.e%29%3BmenuPopup.dispatchEvent%28this.e%29%3B%7D%7D%2C%20false%2C%20menuPopup%29%3B%0A%0A//%20%u041E%u0442%u043A%u0440%u044B%u0442%u044C%20%u043C%u0435%u043D%u044E%20%u043A%u043D%u043E%u043F%u043A%u0438%20%u043F%u043E%20%u0441%u043E%u0447%u0435%u0442%u0430%u043D%u0438%u044E%20%u043A%u043B%u0430%u0432%u0438%u0448%20Alt%20+%20M%20%28%u043D%u0435%20%u0437%u0430%u0432%u0438%u0441%u0438%u0442%20%u043E%u0442%20%u0442%u0435%u043A%u0443%u0449%u0435%u0439%20%u0440%u0430%u0441%u043A%u043B%u0430%u0434%u043A%u0438%20%u043A%u043B%u0430%u0432%u0438%u0430%u0442%u0443%u0440%u044B%29%0A//%20%u041F%u043E%u0441%u043C%u043E%u0442%u0440%u0435%u0442%u044C%20%u043A%u043E%u0434%u044B%20%u043A%u043B%u0430%u0432%u0438%u0448%20%u043C%u043E%u0436%u043D%u043E%20%u0437%u0434%u0435%u0441%u044C%3A%20https%3A//developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode%23Constants_for_keyCode_value%0AaddEventListener%28%27keyup%27%2C%28e%29%3D%3E%7Bif%20%28e.altKey%20%26%26%20%21e.shiftKey%20%26%26%20%21e.ctrlKey%20%26%26%20e.keyCode%3D%3D77%29%7Be.preventDefault%28%29%3Be.stopPropagation%28%29%3B%0AmenuPopup.showPopup%28this%2C-1%2C-1%2C%22popup%22%2C%22bottomleft%22%2C%22topleft%22%29%3B%7D%7D%2Cfalse%2Cwindow%29%3B%0A//%20%u041A%u043E%u043D%u0432%u0435%u0440%u0442%u0438%u0440%u043E%u0432%u0430%u0442%u044C%20%u0442%u0435%u043A%u0441%u0442%20%u0432%20%u044E%u043D%u0438%u043A%u043E%u0434%20.............%0Afunction%20convertFromUnicode%28charset%2Cstr%29%20%7Bvar%20converter%3DCc%5B%22@mozilla.org/intl/scriptableunicodeconverter%22%5D.createInstance%28Ci.nsIScriptableUnicodeConverter%29%3B%0Aconverter.charset%3Dcharset%3Bstr%3Dconverter.ConvertFromUnicode%28str%29%3Breturn%20str+converter.Finish%28%29%3B%7D%3B%0A%0A%0A%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5B/*CODE*/%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E
Вот этот код прошу подправить, чтобы он создавал рабочую кнопку для 69.0.3 .
Отсутствует
Как это не запускается?
Когда я жму на menuitem «АнтиЗапрет (1)», в консоли прявляется запись
Ясно, что код в пятом элементе массива был с ошибкой. Это я исправил.
Немного отличается метод contextmenu(), а метод click() вообще отсутствует.
То есть, хорошо бы заменить contextmenu(e) {...}, на это
Заменил, но если я добавляю в мою кнопку метод click, то перестаёт работать LongPress - действие по удержанию кнопки. Пользуюсь в своей старой кнопке этой удобной фишкой много лет.
// Quick Toggle https://forum.mozilla-russia.org/viewtopic.php?pid=784139#p784139 // https://forum.mozilla-russia.org/viewtopic.php?pid=784165#p784165 // Быстрое переключение параметров about:config // LongClick не срабатывает второй раз, сначала нужно открыть меню (async (name, id, func) => { if (name == "Object") return CustomizableUI.createWidget(func()); var win = name == "Window", g = Components.utils.import("resource://gre/modules/Services.jsm", {}); if (g[id]) {if (win) return;} else g[id] = func(); if (win) return CustomizableUI.createWidget(g[id]); addDestructor(r => r[5] == "e" && delete g[id]); g[id].onCreated(this); })(this.constructor.name, "QuickToggleAboutConfigSettingsUCF", () => { // BEGIN (this.constructor… {код кнопки}); var {prefs} = Services, db = prefs.getDefaultBranch(""); var pv = parseInt(Services.appinfo.platformVersion); var xul_ns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; //===================================================================================== // refresh: // false - reload current tab // true - reload current tab skip cache // // restart: // false - restart browser // true - restart browser with confirm var primary = [{ pref: ["network.proxy.autoconfig_url", "Прокси (VPN) URL"], userChoice: 0, userAlt: 1, refresh: true, values: [ ["127.0.0.1", "отключен…", "0", "", "Services.prefs.setIntPref('network.proxy.type', 0);"], ["https://antizapret.prostovpn.org/proxy.pac", "АнтиЗапрет", "1", "Надёжный доступ на заблокированные сайты\n\n«Режим прокси» меняется на 2", "Services.prefs.setIntPref('network.proxy.type', 2);"], [prefs.getStringPref("user.pacfile", "file:///etc/proxy.pac"), "user .pac файл", "2"], ["https://git.io/ac-anticensority-pac", "ac-anticensority", "3"], ["localhost", "Tor Browser", "4"] ]},{ pref: ["network.proxy.type", "Режим прокси"], userChoice: 0, userAlt: 2, refresh: true, values: [ [0, "Без прокси", "0", "по-умолчанию"], [5, "Системные (из IE)", "5"], [2, "Автонастройка", "2", "about:config — user.pacfile"], [1, "Ручная настройка", "1", "вторая строка"], [4, "Автоопределение", "4"] ]},{ pref: ["network.proxy.share_proxy_settings", "Прокси для всех протоколов"], userChoice: true, refresh: true, values: [[true, "Да", "", "Прокси для всех протоколов при ручной настройке"], [false, "Нет"]] },{ pref: ["network.trr.mode", "DNS через HTTPS"], userChoice: 2, userAlt: 0, refresh: true, values: [ [0, "Выключен", "0"], [2, "TRR + мой", "2"], [3, "только TRR", "3"] ]},null,{ pref: ["permissions.default.image", "Загрузка изображений"], userChoice: 1, userAlt: 3, refresh: true, values: [[1, "Разрешена"], [3, "Только с сайта"], [2, "Отключить"]] },{ pref: ["image.animation_mode", "Анимация изображений"], userChoice: "none", refresh: true, values: [["none", "Выключена"], ["normal", "Включена"], ["once", "Единожды"]] },{ pref: ["browser.display.use_document_fonts", "Загружать web-шрифты"], userChoice: 1, refresh: true, values: [[1, "Да"], [0, "Нет"]] },null,{ pref: ["media.autoplay.default", "Авто-play аудио/видео"], userChoice: 5, refresh: true, values: [ [0, "Разрешить", "0"], [1, "Запретить", "1"], [2, "Спрашивать", "2"], [5, "Блокировать", "5"] ]},{ pref: ["media.autoplay.blocking_policy", "Автозапуск (политика)"], userChoice: 1, userAlt: 2, refresh: true, values: [ [1, "Временная", "1"], [2, "По действию", "2"], [0, "Постоянная", "0"] ]},{ pref: ["plugin.state.flash", "Flash-plugin"], userChoice: 2, refresh: true, values: [ [2, "Всегда включать", "2"], [1, "Включать по запросу", "1"], [0, "Никогда не включать", "0"] ]},null,{ pref: ["network.cookie.cookieBehavior", "Cookies"], userChoice: 1, userAlt: 3, refresh: false, values: [ [1, "Не принимать сторонние"], [3, "Не принимать с не посещенных"], [4, "Не принимать от трекеров"], [2, "Не принимать со всех"], [0, "Принимать со всех"] ]},{ pref: ["javascript.enabled", "Выполнять скрипты Java"], userChoice: true, refresh: true, values: [[true, "Да"], [false, "Нет"]] },null,{ pref: ["dom.storage.enabled", "Локальное хранилище"], userChoice: true } ]; //===================================================================================== var secondary = [{ pref: ["dom.enable_performance", "Статус загрузки страницы"], userChoice: false },{ pref: ["browser.display.document_color_use", "Использовать цвета сайтов"], userChoice: 0, values: [[0, "Авто", "0"], [1, "Всегда", "1"], [2, "Никогда", "2"]] },{ pref: ["intl.accept_languages", "Язык для веб-страниц"], userChoice: "ru-RU, ru, en-US, en", values: [["chrome://global/locale/intl.properties", "По-умолчанию"], ["en-US, en, ru-RU, ru", "Английская локаль"], ["ru-RU, ru, en-US, en", "Русская локаль"]] },null,{ pref: ["network.http.sendRefererHeader", "Referer - для чего"], userChoice: 1, values: [[0, "Ни для чего", "0"], [1, "Только ссылки", "1"], [2, "Ссылки и изобр.", "2"]] },{ pref: ["media.peerconnection.enabled", "WebRTC утечка IP"], userChoice: false },{ pref: ["gfx.webrender.all", "WebRender для всего"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] },{ pref: ["media.webm.enabled", "Декодер WebM VP8"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] } ]; return { label: "Quick Toggle Settings", id: "QuickToggleAboutConfigSettings", tooltiptext: "Quick Toggle Settings\n ЛКМ ПКМ", localized: false, image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFPSURBVDhPnVPNSsNAEJ5tamnBk+A7BMEcikohp/gi9i18nRafQoT00kK16tnn8CJo4vp9m5m41eSgH0zmd3d+diJ/gfdedvl0QW7k1PcLwem+3TjowZagK+Nn6yc3gNCJ+LCCh9LzzTMdqeoNbkQSFZmpJLGCW5Gx2hZaQahMbZ52VuDSfHpnAVJXOb4FKzianbzCXiLrHLYl5C3t5NTRwtxaKJxUTZ/JcOTr6q2Rxwf0aVb2/hLs4KqL3Isckz/mmSdRRksjyg+z7IM6LzDCBfuvAEOJmIKBOqAWmo1YodxLlQNsyO0rsIV/AZM+JGc2a4GgzhZ2p9mFmrpboCMqNYBDdMlwompoTWN6F2nFT5hBXb0PEpmo/Gk+oH+RrqNZINPeIlnZViV1jQuLFJQuWGB0gJdwgShvqdPXZv6J+F/QS7oXqQ9xBTFZ5oa8fAGs9fed5YhPSwAAAABJRU5ErkJggg==", onCreated(btn) { btn.setAttribute("image", this.image); var doc = btn.ownerDocument; btn.btn = true; btn.domParent = null; btn.popups = new btn.ownerGlobal.Array(); this.createPopup(doc, btn, "primary", primary); this.createPopup(doc, btn, "secondary", secondary); this.createCloseMenusOption(doc, btn); btn.linkedObject = this; for(var type of ["command", "contextmenu", "mousedown"]) btn.setAttribute("on" + type, `linkedObject.${type}(event)`); }, createPopup(doc, btn, name, data) { var popup = doc.createElementNS(xul_ns, "menupopup"); var prop = name + "Popup"; btn.popups.push(btn[prop] = popup); popup.id = this.id + "-" + prop; for (var type of ["popupshowing", "click"]) popup.setAttribute("on" + type, `parentNode.linkedObject.${type}(event)`); for(var obj of data) popup.append(this.createElement(doc, obj)); btn.append(popup); }, map: {b: "Bool", n: "Int", s: "String"}, createElement(doc, obj) { if (!obj) return doc.createElementNS(xul_ns, "menuseparator"); var pref = doc.ownerGlobal.Object.create(null), node, img, bool; for(var [key, val] of Object.entries(obj)) { if (key == "pref") { var [apref, lab, akey, ttt] = val; pref.pref = apref; pref.lab = lab || apref; if (ttt) pref.ttt = ttt; } else if (key == "image") img = val, pref.img = true; else if (key != "values") pref[key] = val; else pref.hasVals = true; } var type = prefs.getPrefType(pref.pref); var str = this.map[type == prefs.PREF_INVALID ? obj.values ? (typeof obj.values[0][0])[0] : "b" : type == prefs.PREF_BOOL ? "b" : type == prefs.PREF_INT ? "n" : "s" ]; pref.get = prefs[`get${str}Pref`]; /* pref.set = prefs[`set${str}Pref`]; */ var map, set = prefs[`set${str}Pref`]; if (pref.hasVals) { for(var [val, , , , code] of obj.values) code && (map || (map = new Map())).set(val, code); if (map) pref.set = (key, val) => { set(key, val); map.has(val) && eval(map.get(val)); // выполнить код } } if (!map) pref.set = set; node = doc.createElementNS(xul_ns, "menu"); node.className = "menu-iconic"; node.setAttribute("closemenu", "none"); img && node.setAttribute("image", img); akey && node.setAttribute("accesskey", akey); (node.pref = pref).vals = doc.ownerGlobal.Object.create(null); this.createRadios(doc, str.startsWith("B") && !pref.hasVals ? [[true, "true"], [false, "false"]] : obj.values, node.appendChild(doc.createElementNS(xul_ns, "menupopup")) ); if ("userChoice" in obj) pref.noAlt = !("userAlt" in obj); return node; }, createCloseMenusOption(doc, btn) { var pn = this.closePref = "QuickToggleAboutConfigSettings.closeMenus"; var data = [null, { pref: [pn, "Закрывать меню этой кнопки"], values: [[true, "Да"], [false, "Нет"]] }]; var setCloseMenus = e => { e.stopPropagation(); var trg = e.target, {pref, val} = trg, updPopup = true, clear; switch(e.type) { case "command": pref = (trg = trg.closest("menu")).pref; updPopup = false; break; case "click": if (e.button) return; break; case "contextmenu": e.preventDefault(); clear = pref; } if (!pref) return; if (clear) prefs.clearUserPref(pn); else if (!updPopup && val === pref.val) return; else pref.set(pn, val !== undefined ? val : !pref.val); this.upd(trg); updPopup && this.popupshowing(null, trg.querySelector("menupopup")); } (this.createCloseMenusOption = (doc, btn) => { for(var obj of data) btn.secondaryPopup.append(this.createElement(doc, obj)); var m = btn.secondaryPopup.lastChild; m.style.cssText = "fill: lightblue !important; list-style-image: url(chrome://browser/skin/menu.svg) !important;"; m.setAttribute("oncommand", "setCloseMenus(event)"); m.onclick = m.oncontextmenu = m.setCloseMenus = setCloseMenus; })(doc, btn); }, UserChoiceImg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRUlEQVR42qWTS2gTQRjH/zPJZo2BDfgkB62vYg5CjQdvRUE8WB8HKyahYotIQQOeFKGCF7EgvQlBqOCjWFKlevBRDyL4uHloLXhYqWJroaEqlETSptndGb+ZPDH0ojN8O8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DqLdiNZqCRITKYayx85RfQuUNiZ3k7IgO+vfGeXGpkiAyma++WLHtZhZ8o5H/FEVpos1V7u8TFwLQId8nw+Afa51Oq2vyycmlk9KCW0GXFZeu63IUO8z88Bx5s28SbuUXfddzrxVcobxpI0GTh7H734/dPzQt9d0/CGBpCPB7nbhmwbAPVxR4+PPtsuU7/WuElth/lKORUcsoTE8TgMg0WbJaY4Zu3XKYdBrABARUk+ls4DfQAAAAASUVORK5CYII=", upd(node) { var {pref} = node, def = false, user = false, val; if (prefs.getPrefType(pref.pref) != prefs.PREF_INVALID) { var pn = pref.pref; try {val = pref.defVal = db[pref.get.name](pn); def = true} catch(ex) {def = false;} var user = prefs.prefHasUserValue(pn); if (user) try {val = pref.get(pn, undefined);} catch(ex) {} } if (val == pref.val && def == pref.def && user == pref.user) return; pref.val = val; pref.def = def; pref.user = user; var exists = def || user; var ttt = exists ? val : "Этого префа не существует"; if (ttt === "") ttt = "[ empty_string ]"; ttt += "\n" + pref.pref; if (pref.ttt) ttt += "\n" + pref.ttt; node.tooltipText = ttt; var img, alt = "userAlt" in pref && val == pref.userAlt; if (alt) img = this.UserAltImg; if ("userChoice" in pref) if (val == pref.userChoice) //node.style.removeProperty("color"), img = this.UserChoiceImg; else { //node.style.setProperty("color", "maroon", "important"); if (!alt) img = this.notUserChoiceImg; } if (!pref.img) img ? node.setAttribute("image", img) : node.removeAttribute("image"); user ? node.style.setProperty("font-style", "italic", "important") : node.style.removeProperty("font-style"); var {lab} = pref; if (exists && pref.hasVals) { if (val in pref.vals) var sfx = pref.vals[val] || val; else var sfx = user ? "Другое" : "По умолчанию"; lab += ` — "${sfx}"`; } node.setAttribute("label", lab); }, createRadios(doc, vals, popup) { for(var arr of vals) { if (!arr) { popup.append(doc.createElementNS(xul_ns, "menuseparator")); continue; } var [val, lab, key, ttt] = arr; var menuitem = doc.createElementNS(xul_ns, "menuitem"); menuitem.setAttribute("type", "radio"); menuitem.setAttribute("closemenu", "none"); menuitem.style.setProperty("font-style", "italic", "important"), menuitem.setAttribute("label", popup.parentNode.pref.vals[val] = lab); key && menuitem.setAttribute("accesskey", key); var tip = menuitem.val = val; if (ttt) tip += "\n" + ttt; menuitem.tooltipText = tip; popup.append(menuitem); } }, openPopup(popup) { var btn = popup.parentNode; if (btn.domParent != btn.parentNode) { btn.domParent = btn.parentNode; var pos; if (btn.matches(".widget-overflow-list > :scope")) pos = "after_start"; else var win = btn.ownerGlobal, {width, height, top, bottom, left, right} = btn.closest("toolbar").getBoundingClientRect(), pos = width > height ? `${win.innerHeight - bottom > top ? "after" : "before"}_start` : `${win.innerWidth - right > left ? "end" : "start"}_before`; for(var p of btn.popups) p.setAttribute("position", pos); } popup.openPopup(btn); }, maybeRestart(node, conf) { var msgRest = "Перезапустить браузер?", msgAbort = "Запрос на выход отменен."; if (pv >= 77) { var title = node.closest("toolbarbutton").label; var pp = domWin => Services.prompt.wrappedJSObject.pickPrompter({ domWin, modalType: Ci.nsIPrompt.MODAL_TYPE_WINDOW }); var confirm = win => pp(win).confirm(title, msgRest); var alert = win => pp(win).alert(title, msgAbort); } else { var confirm = win => win.confirm(msgRest); var alert = win => win.alert(msgAbort); } return (this.mayBeRestart = (node, conf) => { var win = node.ownerGlobal; if (conf && !confirm(win)) return; if (win.BrowserUtils.restartApplication() === false) alert(win); else return true; })(node, conf); }, regexpRefresh: /^(?:view-source:)?(?:https?|ftp)/, maybeRe(node, fe) { var {pref} = node; if ("restart" in pref) { if (this.maybeRestart(node, pref.restart)) return; } else this.popupshowing(fe, node.parentNode); if ("refresh" in pref) { var win = node.ownerGlobal; if (this.regexpRefresh.test(win.gBrowser.currentURI.spec)) pref.refresh ? win.BrowserReloadSkipCache() : win.BrowserReload(); } }, maybeClosePopup(e, trg) { !e.ctrlKey && prefs.getBoolPref(this.closePref, undefined) && trg.parentNode.hidePopup(); }, command(e) { var trg = e.target; if (trg.btn) return this.openPopup(trg.primaryPopup); var menu = trg.closest("menu"), newVal = trg.val; this.maybeClosePopup(e, menu); if (newVal != menu.pref.val) menu.pref.set(menu.pref.pref, newVal), this.maybeRe(menu, true); }, popupshowing(e, trg = e.target) { if (trg.state == "closed") return; if (trg.id) { for(var node of trg.children) { if (node.nodeName.endsWith("r")) continue; this.upd(node); !e && node.open && this.popupshowing(null, node.querySelector("menupopup")); } return; } var {pref} = trg.closest("menu"), findChecked = true; var findDef = "defVal" in pref; var checked = trg.querySelector("[checked]"); if (checked) { if (checked.val == pref.val) { if (findDef) findChecked = false; else return; } else checked.removeAttribute("checked"); } if (findDef) { var def = trg.querySelector("menuitem:not([style*=font-style]"); if (def) if (def.val == pref.defVal) { if (findChecked) findDef = false; else return; } else def.style.setProperty("font-style", "italic", "important"); } for(var node of trg.children) if ("val" in node) { if (findChecked && node.val == pref.val) { node.setAttribute("checked", true); if (findDef) findChecked = false; else break; } if (findDef && node.val == pref.defVal) { node.style.removeProperty("font-style"); if (findChecked) findDef = false; else break; } } }, contextmenu(e) { var trg = e.target; if (trg.btn) { if (e.ctrlKey || e.shiftKey) return; if (e.detail == 2) return trg.secondaryPopup.hidePopup(); this.openPopup(trg.secondaryPopup); } else if ("pref" in trg && trg.pref.user) prefs.clearUserPref(trg.pref.pref), this.maybeRe(trg, true); e.preventDefault(); }, mousedown(e) { var reset = e => e.target.linkedObject = this; var id, lo = {command: reset, mousedown: reset}; var lin = e.view.AppConstants.platform == "linux"; var stop = e => reset(e) && e.preventDefault(); lo.contextmenu = lin ? e => e.ctrlKey || e.shiftKey ? dsp(e) : stop(e) : stop; var context = lin ? e => e.button == 2 && e.type.endsWith("p") && this.contextmenu(e) : () => {}; var dsp = (e, timeout) => { var trg = e.target; trg.onmouseup = trg.onmouseleave = null; if (timeout) return this.londPress(e); e.view.clearTimeout(id); reset(e); context(e); } (this.mousedown = e => { var trg = e.target; if (!trg.btn) return; trg.linkedObject = lo; trg.onmouseup = trg.onmouseleave = dsp; id = e.view.setTimeout(dsp, 500, e, true); })(e); }, londPress(e) { // удержание кнопки мыши, выбирать команды, отводящие мышь от кнопки var msg = "QuickSettings\nLONG PRESS: e.button = " + e.button; e.view.alert(msg); } }; }); // END код кнопки
Отредактировано Dobrov (26-03-2021 04:19:21)
Отсутствует
Dumby
Посмотрите, пожалуйста эту кнопку.
Перестала работать в 87
//Дополнительные пункты контекстного меню на странице about:addons для аддонов, плагинов, тем, CB..................................................................................... ((id, g, iconizer) => addDestructor(r => r[5] == "e" && id in g && g[id].destroy()) + addEventListener("shown", { //------------------------------------------------------------------ "Копировать имя_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByUlEQVQ4jY2TTUhUURiGn5tD0Sp00iAwXM1iFu4kWkUZg/9MoZQhdoUCV7ooItq4atFORRGkuLMwoc0kNBGKDLSwFpEIQgspqGUUNsjI3HvPX4s7I3Nn7oW+1fn5vvd8z3vOsYiIgXuPneFMr21ZVmh9+m7GisoPxcTsM2d46on5c1gy9bHgvDVR+afqJzNzy870xIgNUJGGkqf4XVEAuJ4XeWCiNpibX3MGr/XYPd0pADxlOK0MQgf7Xw++sfJq0zRiJQAWcgWndHRkr28UWcrlAfCVwa8KrK4XOPxbYqz/MsnWcyfFi7lCIPD9x0/70YNRykKz+eELQkny74sIJbnQmqQ71UVhe+cES2hoP9uC63mBgO/7dF7s4NexZPRmBqlBaMPHnc+kL7UTh1VxqwKuGxjkaUP+zRZCSVqwKJeP2dvdj8SqGZuod9hXhr6hGwgNL5ZfEoc1PnaL2sFNAlvvthFKxmJJbfCUqXbghhHSyTOkJwcBmHr4vAnLVwKhJEPZbLgDXwh678yG7rfjfLIJS2qD0IEP9R6kiq8XrzS+sOz9p5+asKodXB0YCQkcNBbHYUXlxP6u67dnIj9PY8QJpIC2/6iX/wDxeTOAfNDrywAAAABJRU5ErkJggg==", "Копировать имя"(addon, hideOn) { if (hideOn) return false; gClipboard.write(addon.name); }, //------------------------------------------------------------------ "Копировать ID_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByUlEQVQ4jY2TTUhUURiGn5tD0Sp00iAwXM1iFu4kWkUZg/9MoZQhdoUCV7ooItq4atFORRGkuLMwoc0kNBGKDLSwFpEIQgspqGUUNsjI3HvPX4s7I3Nn7oW+1fn5vvd8z3vOsYiIgXuPneFMr21ZVmh9+m7GisoPxcTsM2d46on5c1gy9bHgvDVR+afqJzNzy870xIgNUJGGkqf4XVEAuJ4XeWCiNpibX3MGr/XYPd0pADxlOK0MQgf7Xw++sfJq0zRiJQAWcgWndHRkr28UWcrlAfCVwa8KrK4XOPxbYqz/MsnWcyfFi7lCIPD9x0/70YNRykKz+eELQkny74sIJbnQmqQ71UVhe+cES2hoP9uC63mBgO/7dF7s4NexZPRmBqlBaMPHnc+kL7UTh1VxqwKuGxjkaUP+zRZCSVqwKJeP2dvdj8SqGZuod9hXhr6hGwgNL5ZfEoc1PnaL2sFNAlvvthFKxmJJbfCUqXbghhHSyTOkJwcBmHr4vAnLVwKhJEPZbLgDXwh678yG7rfjfLIJS2qD0IEP9R6kiq8XrzS+sOz9p5+asKodXB0YCQkcNBbHYUXlxP6u67dnIj9PY8QJpIC2/6iX/wDxeTOAfNDrywAAAABJRU5ErkJggg==", "Копировать ID"(addon, hideOn) { if (hideOn) return false; gClipboard.write(addon.id); }, //------------------------------------------------------------------ "Копировать версию_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByUlEQVQ4jY2TTUhUURiGn5tD0Sp00iAwXM1iFu4kWkUZg/9MoZQhdoUCV7ooItq4atFORRGkuLMwoc0kNBGKDLSwFpEIQgspqGUUNsjI3HvPX4s7I3Nn7oW+1fn5vvd8z3vOsYiIgXuPneFMr21ZVmh9+m7GisoPxcTsM2d46on5c1gy9bHgvDVR+afqJzNzy870xIgNUJGGkqf4XVEAuJ4XeWCiNpibX3MGr/XYPd0pADxlOK0MQgf7Xw++sfJq0zRiJQAWcgWndHRkr28UWcrlAfCVwa8KrK4XOPxbYqz/MsnWcyfFi7lCIPD9x0/70YNRykKz+eELQkny74sIJbnQmqQ71UVhe+cES2hoP9uC63mBgO/7dF7s4NexZPRmBqlBaMPHnc+kL7UTh1VxqwKuGxjkaUP+zRZCSVqwKJeP2dvdj8SqGZuod9hXhr6hGwgNL5ZfEoc1PnaL2sFNAlvvthFKxmJJbfCUqXbghhHSyTOkJwcBmHr4vAnLVwKhJEPZbLgDXwh678yG7rfjfLIJS2qD0IEP9R6kiq8XrzS+sOz9p5+asKodXB0YCQkcNBbHYUXlxP6u67dnIj9PY8QJpIC2/6iX/wDxeTOAfNDrywAAAABJRU5ErkJggg==", "Копировать версию"(addon, hideOn) { if (hideOn) return ["custombuttons"]; gClipboard.write(addon.version); }, //------------------------------------------------------------------ "Копировать имя и версию_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByUlEQVQ4jY2TTUhUURiGn5tD0Sp00iAwXM1iFu4kWkUZg/9MoZQhdoUCV7ooItq4atFORRGkuLMwoc0kNBGKDLSwFpEIQgspqGUUNsjI3HvPX4s7I3Nn7oW+1fn5vvd8z3vOsYiIgXuPneFMr21ZVmh9+m7GisoPxcTsM2d46on5c1gy9bHgvDVR+afqJzNzy870xIgNUJGGkqf4XVEAuJ4XeWCiNpibX3MGr/XYPd0pADxlOK0MQgf7Xw++sfJq0zRiJQAWcgWndHRkr28UWcrlAfCVwa8KrK4XOPxbYqz/MsnWcyfFi7lCIPD9x0/70YNRykKz+eELQkny74sIJbnQmqQ71UVhe+cES2hoP9uC63mBgO/7dF7s4NexZPRmBqlBaMPHnc+kL7UTh1VxqwKuGxjkaUP+zRZCSVqwKJeP2dvdj8SqGZuod9hXhr6hGwgNL5ZfEoc1PnaL2sFNAlvvthFKxmJJbfCUqXbghhHSyTOkJwcBmHr4vAnLVwKhJEPZbLgDXwh678yG7rfjfLIJS2qD0IEP9R6kiq8XrzS+sOz9p5+asKodXB0YCQkcNBbHYUXlxP6u67dnIj9PY8QJpIC2/6iX/wDxeTOAfNDrywAAAABJRU5ErkJggg==", "Копировать имя и версию"(addon, hideOn) { if (hideOn) return ["custombuttons"]; gClipboard.write(addon.name + " " + addon.version); }, //------------------------------------------------------------------ "Домашняя страница_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAC4jAAAuIwF4pT92AAAIIklEQVRYR61Xa1CU1xlGUNTpr/7rdNr+sCbt2DrRphPb0VZnWtsYhk5tNWnaaHHaVJsoWgWVNlRbMQoaE6poQATkLpdlWVAzLusqLgioi9xEdkGIIJdd9vLt5dvbd76n7/ncdaxigLbvzDNnYc6e5znP+55z3o2KeibmzZsXNX/+/KhYwvz/M/ja08VXCN8mvEx4KTz+r3gpjG8RvkqYGzVVzJkzJ5qGH+3Zs+diUVGxMTc393Zefr4xn6OgwFgQwfnzxvMRFBY+QWEERUXPfabv3S4vL29PTk7OI475xPW8gOjoaK5sTf3Fi8OgcHs88Pn98AcCCISCCIZCCEkSJMYUMFmGjJlFZN4VrbadOGKJ63kBpCqGhtVl5eV9gsvFHg4Ph0bHxtjY+Dgbn5hgExwWi4Jxi5VZrJPMOslhY1abnVlotNntzM7hcChwhDFpswVJPKuurm6Kms6BiooKs1cUwcktViuIBLSAAiKC2+VEUBTgdTng87rgF10I0N9ykBzzuuEUXHC53HC53XCH4RQECeSYuqbmJhcwpQNPBFRWmkWfD+O08wg57RJOp4OInTAPW1FmeIjTegu2fGpEwulOpNePotzwOR6M2UmIF16vlwR44PESKJUul0viaVCr1dMLqCQBPO/c8gi51+0EWY6shhEk5D7A91Nv4Y1jXViZ2oR1Gb1IrAghIWcMm7O6kasfgUC7Dvp9JECESG6SCxKvAXVt7fQCqqqqzIFgEBbKNbfcQ5YPjFjwx3MD2FLixHf3NmJlih7xaQZsy+7Gscs2nNCKyLwK7C624O3MXhxUj2PU5kIo6CcBPnLEowionakAXvGUf8Ztn7Tb8bdaO9K1AdR1BLEq1YC3jt/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JG04+xJZzVtq1F9tLfDhU44DN7oBLcMo2m12iYOHXMPYL+4GIAx6Pm/GHhNG1PDLpwfqMdvzk4x7sqBhGRr0HJ3UBHP8sgLQ6Pz0+fqp2brkP72TbkVw6hs/paXYLDtlisWJ4eCRIAlBcXNxAHHO+OAW1tYoAasmYn1oyn8+viHC4fThM9bn+TB9WpfWR1YPYeHIMvz1jwcZTE4g7Pox4cildNQBT/yB6ujtlQ9NNNN64IZlMZrm1tdW6ePHiFZxrzlQWRATUPnHAQykIKO/5+PgE+vvN6Ll7CyWqS3j3wwtYlViOV7fXYMVODX62V41tR1UoU1/BndYbuFBeJtdqNDAYDKy3t5fdvXvXv3Tp0rgw+XPc/ykg7AB1NYoA7oIgCBgdHYXJ3I/7PV3oNrbgVvN13LiuQ1OjHrdbGpX/3evuQIPuqkxtHV+C8UZkYGAAa9asSQhzvIB9CgGecAqC1JyEqD9g1AlH4ulumNG7wdPEe0G73SHTrqHX66mXcEq0e8TFxe2aljw8QemKSYDpaQc4uIiIEA5eUFwQH7lI3njabDaZu3Tp8mWpq6tL5juPj49XyKfM+bNBc7gDq1UqVR+RSNRIBin/ks/nk4hEAYl5AhKkjCRU4ru1Wq2S2WwOGo1GdHZ2+teuXbuFrzvtziMRdmCNTqd7hP8iuCO8YNva2izLly9fF15zivP2ggj/NPvO3r178y9cuKCjM6stLS3VlZWVPQH9vHoONKeBn2/6qabNyclRLVq06Ht8vRiKaSinjNgw5s4CMU99VmJWO382YmNjoxcuXBizYMGCuYSYFyE859l588KpnHH8G9SEW7QrlTX7AAAAAElFTkSuQmCC", "Домашняя страница"(addon, hideOn) { if (hideOn) return !addon.homepageURL; var url = addon.homepageURL; if (!url) { if (addon.reviewURL) { url = addon.reviewURL.replace(/\/reviews\/.*$/, "/"); } } openURL(url); }, //------------------------------------------------------------------ "Поиск на АМО_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJGSURBVDjLjdJLSNRBHMDx78yqLZaKS75DPdgDDaFDbdJmde5QlhCJGxgpRJfqEEKnIsJLB7skQYQKZaSmdLaopPCgEvSCShCMzR5a7oq7/3l12RVtjfzBMA/4fWZ+MyOccwBM3g8HEbIdfCEhfAFnLVapOa28Uevpjrqz/WOsERJgsu9Uq5CZQzgqrJfo9BajNd5irEYn4p3OUiFExtCLmw2tawFi4l5zUMjMIau9u7K+qxeoAcoAA0wDb2OPwmfA16LiiaOHLj1edRLpkO3WmIis7+oBDgJbgQ2AH6gC6jY19N62RkcctKeVIJAhp9QgUA3kJXdONZVcq9JxPSgQoXRAyIDRth8oAXQyKdWnoCKrTD9CBv4GMqx1WGNZkeRWJKbG2hiD1Cb9FbTnzWFdY/LCdLKlgNQ84gyNKqHm0gDjqVHnxDHgA/B9RQkpaB6YklkZl62np9KBhOqwjpKFgeY2YAz4BESBWHI8Hhs6PVVSvc3v98ye4fP7T676B845nt040ip98qpWJmI9PWiU6bfWgXGN2YHcKwU7tsuc4kpUPMbU0+f8+vKt+Pitl7PLAMDI9cNBoB0hQwICzjqUp6MZvsy8yvp95BRuQUjJ75mPvH4wYo1NlJ64Mza7DPwrhi8cCOeXl/aUB4P4c/NJxKLMvpngycCrzxVFG2v/CwAMnguF80oLe8p27cQh+fnpPV/fTc95S6piXQDAw7a9YbWkezZXFbAwMx/xPFXb1D3+Y90AQF/L7kAsri9mZ4lrTd0TcYA/Kakr+x2JSPUAAAAASUVORK5CYII=", "Поиск на АМО"(addon, hideOn) { if (hideOn) return ["custombuttons","theme","plugin"]; var url = addon.homepageURL; if (!url) { url = "https://addons.mozilla.org/search/?q=" + encodeURIComponent(addon.name); } openURL(url); }, //------------------------------------------------------------------ "Папка установки_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABAklEQVR42mNkoBAwAjEXEAcCMTsW+U9AvB6I/+I0gJ2Noe3QJoZKASEgjwkq+h+C795lYPCKZMgC8mZg0fsfbICIIMOcF6cZkrGZ/v8fA0PndIa/7z8BXfAPqgVKv//A8GPeZoYERmE+hjmP1+AwAOgiTjOIP7HZLyjLMJNRmB/ogjMMyYzsUC8wIhQwsgCFWHAHoKAy0AARIYY5r69idwEhIKgBMgAYBq8vkGmALsyAU2QaYAwz4CiZBliADBAAGnCATANsYQbsJtMAJ5ABwGh8uZE8A4R9gAYwMzHkT8hl6Bfgxp5ecIH3Xxj+F05hyIdpUmXAnpnwge9AfJckW7EBAC/gSzisxsnmAAAAAElFTkSuQmCC", "Папка установки"(addon, hideOn) { if (hideOn) return ["custombuttons","theme","plugin"]; switch (addon.type) { case "plugin": var pathes = addon.pluginFullpath; for (var i = 0; i < pathes.length; i++) { this.revealPath(pathes[i]); } return; case "userchromejs": var file = addon._script.file; if (file.exists()) file.reveal(); return; } var gecko = parseInt(Services.appinfo.platformVersion); var nsLocalFile = Components.Constructor("@mozilla.org/file/local;1", (gecko >= 14) ? "nsIFile" : "nsILocalFile", "initWithPath"); var dir = Services.dirsvc.get("ProfD", Ci.nsIFile); dir.append("extensions"); dir.append(addon.id); var fileOrDir = dir.path + (dir.exists() ? "" : ".xpi"); try { (new nsLocalFile(fileOrDir)).reveal(); } catch (ex) { var addonDir = /.xpi$/.test(fileOrDir) ? dir.parent : dir; try { if (addonDir.exists()) { addonDir.launch(); } } catch (ex) { var uri = Services.io.newFileURI(addonDir); var protSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"]. getService(Ci.nsIExternalProtocolService); protSvc.loadUrl(uri); } } }, //------------------------------------------------------------------ "Файл установки_i": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA51AAAOdQG5Y1EyAAAAhklEQVQ4y6WT0QnAIAxE78Bt2v1cod3PznP9kVLTRKUGBD+Sd5eQUBJWggCWCAkAJPGXOqlUPyVKkrSPQIoCQJGE6AF4HFyGuBmrR3cGQX8Wmp2cL8Cqv5JPD5Zm1D0nFZjTjHpQ7DuI1L3iBjBS9/pvhtjr21OukVkXiX/ug6SWj4mr53wDMz1vldHlLJkAAAAASUVORK5CYII=", "Файл установки"(addon, hideOn) { if (hideOn) return ["custombuttons","theme","plugin"]; var gecko = parseInt(Services.appinfo.platformVersion); var nsLocalFile = Components.Constructor("@mozilla.org/file/local;1", (gecko >= 14) ? "nsIFile" : "nsILocalFile", "initWithPath"); var dir = Services.dirsvc.get("ProfD", Ci.nsIFile); dir.append('extensions'); dir.append(addon.id); if ( dir.exists() ) dir.launch(); var file = Components.classes['@mozilla.org/file/directory_service;1'] .getService(Components.interfaces.nsIProperties) .get('ProfD', Components.interfaces.nsIFile); file.append('extensions'); file.append( addon.id + '.xpi' ) if ( file.exists() ) file.launch(); return; }, //------------------------------------------------------------------ url: "chrome://mozapps/content/extensions/aboutaddons.html", handleEvent(e) { if (e.target.baseURI != this.url) return; var item = this.getItem(e.target.ownerDocument); var addon = item.addon = e.target.closest("addon-card").addon; for(var child of item.children) { var res = this[child.textContent](addon, true); child.hidden = Array.isArray(res) ? res.includes(addon.type) : res; } e.target.contains(item) || requestAnimationFrame( () => e.target.prepend(item) ); }, click(e) { e.stopPropagation(); iconizer.item.parentNode.hide(); this[e.target.textContent](iconizer.item.addon); }, getItem(doc) { if (iconizer.item) { if (iconizer.item.ownerDocument == doc) return iconizer.item; iconizer.handleEvent(); } var item = doc.createElement("div"); item.id = id; for(var lab of this.labels) item.appendChild( doc.createElement("panel-item") ).append(lab); item.onclick = this.click; doc.ownerGlobal.addEventListener("unload", iconizer); return iconizer.item = item; }, get labels() { delete this.labels; this.click = this.click.bind(this); if (id in g) return this.labels = (iconizer = g[id]).labs; g[id] = iconizer; var css = "", ind = 0, arr = []; var push = (ind, icon) => { var chromeImg = `chrome://custombuttons/content/${id + ind}`; arr.push(["override", chromeImg, icon]); return chromeImg; } var labs = iconizer.labs = Object.keys(this).filter(key => { var res = String(this[key]).startsWith('"'); if (!res) return false; ind++; var icon = this[key + "_i"]; if (icon) css += `\n\t#${ id } > panel-item:nth-child(${ind}) {\n\t\t--icon: url(${ push(ind, icon) }) !important;\n\t}`; return true; }); var ams = Cc["@mozilla.org/addons/addon-manager-startup;1"].getService(Ci.amIAddonManagerStartup); var mUri = Services.io.getProtocolHandler("resource").getSubstitution("custombuttons-modules"); iconizer.iconHelper = ams.registerChrome(mUri, arr); var sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); var md = "@-moz-document url(chrome://mozapps/content/extensions/aboutaddons.html) {"; var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(md + css + "\n}")); var args = [uri, sss.USER_SHEET]; sss.loadAndRegisterSheet(...args); iconizer.handleEvent = function() { if (!this.item) return; this.item.ownerGlobal.removeEventListener("unload", this); this.item.remove(); this.item = null; } iconizer.destroy = function() { delete g[id]; this.handleEvent(); sss.unregisterSheet(...args); this.iconHelper.destruct(); } return this.labels = labs; }, revealPath: function(path){ var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); file.initWithPath(path); if(file.exists()) file.reveal(); } }, true, gBrowser.tabpanels || 1))("CBAddonsMenuExt", Cu.import("resource://gre/modules/Services.jsm", {}), {}); //Дополнительные кнопки на странице about:addons для аддонов, плагинов, тем, CB..................................................................................... ((cn, flag, css) => addEventListener("update", ({ btnActions: ["preferences", "toggle-disabled", "remove", "install-update"], every(reason) { reason || addDestructor(this.every, this); var g = this.g || (this.g = Cu.import( "resource://gre/modules/AddonManager.jsm", {} )); var has = flag in g; if (reason) { if (!has || reason[5] != "e") return; } else if (has) return this; var method, wins = Array.from( g.AddonManagerInternal.addonListeners, Cu.getGlobalForObject ).filter( w => w.docShell && w.docShell.name == "html-view-browser" ); if (reason) method = "destroyDoc", delete g[flag]; else method = "initDoc", g[flag] = true; for(var win of new Set(wins)) this[method](win.document); return this; }, initDoc(doc, onlyStyle) { if (doc[flag]) return; doc[flag] = true; doc.ownerGlobal.windowUtils.loadSheetUsingURIString(this.url, this.type); if (onlyStyle) return; for(var card of doc.getElementsByTagName("addon-card")) this.onCard(card); }, destroyDoc(doc) { if (!doc[flag]) return; delete doc[flag]; for(var span of Array.from(doc.getElementsByClassName(cn))) span.remove(); doc.ownerGlobal.windowUtils.removeSheetUsingURIString(this.url, this.type); }, get url() { this.type = windowUtils.USER_SHEET; this.btnActions = this.btnActions.map( action => `panel-list > panel-item[action="${action}"]` ); delete this.url; return this.url = "data:text/css;charset=utf-8," + encodeURIComponent(css.replace(/;/g, " !important;")); }, handleEvent(e) { var card = e.target; card.nodeName == "ADDON-CARD" && this.onCard(card); }, onCard(card, again) { var div = card.querySelector("div.more-options-menu"); if (!div) return again || card.ownerGlobal.requestAnimationFrame( () => this.onCard(card, true) ); var [span] = card.getElementsByClassName(cn); if (span) span.textContent = ""; else { var doc = card.ownerDocument; doc[flag] || this.initDoc(doc, true); div.before(span = doc.createElement("span")); span.className = cn; span.onclick = this.onclick; } var btns = this.btnActions.map(sel => { var item = div.querySelector(sel); return item && item.cloneNode(true); }); var {addon} = card, cbbtn = addon.type == "custombuttons"; for(var item of btns) if (item) { span.append(item); item.shadowRoot.querySelector("button").classList.add("cb-cloned-button"); if (cbbtn) item.closest = this.closest; } if (addon.id != "custombuttons@xsms.org") return; var item = span.querySelector("[action=preferences]"); if (item) item.removeAttribute("hidden"), item.onclick = this.cbprefs; }, onclick(e) { InspectorUtils.removeContentState(e.target, 4, true); Services.focus.clearFocus(e.target.ownerGlobal); }, closest(sel) { return sel == ".more-options-menu" || this.ownerGlobal .Element.prototype.closest.call(this, sel); }, cbprefs(e) { var url = "chrome://custombuttons/content/prefs.xul"; for(var win of Services.wm.getEnumerator(null)) if (!win.closed && win.document.documentURI == url) return win.focus(); e.view.requestAnimationFrame(() => openDialog( url, "", "chrome,titlebar,toolbar,centerscreen,modal" )); } }).every(), true))("cb-cloned-buttons-container", "AAcbButtonizedFlag", ` addon-card:not([expanded]) .card-contents { width: 1px; } span.cb-cloned-buttons-container { display: flex; } button.cb-cloned-button { width: auto; padding: 1px 6px 3px 6px; margin: 0 1px; background-image: none; //background: #CCFFFF ; border: 1px solid var(--in-content-box-border-color); //border-style: solid; //border-color: #99FFFF #99FFFF; border-radius: 0px; font-size: 13px; font-family: Segoe UI; } button.cb-cloned-button:hover { background: gold ; } button.cb-cloned-button:after { display: none; } `);
На форуме