Посмотри пожалуйста...
Сейчас времени нет, однако, чуть прикоснулся
(obj => { this._handleClick = () => obj.popup.openPopup(this, "after_start"); this.onmouseenter = e => this.tooltipText = this.label + "\nЛ: Меню кнопки\nП: CB меню\n\nПапка для экспорта:\n" + (obj.path || "Не установлено."); addDestructor(reason => reason == "delete" && Services.prefs.clearUserPref(obj.pref)); })({ get popup() { var popup = document.createXULElement("menupopup"); addEventListener("command", e => this[e.target.value](), false, popup); var keys = ["label", "value", "image"]; for(var data of [ ["Экспорт закладок в HTML-файл", "export", "data:image/x-icon;base64,AAABAAEAEhIAAAEAIACABQAAFgAAACgAAAASAAAAJAAAAAEAIAAAAAAAWAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAADg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAADg/o/w4P6P8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAADg/o/zUq6P8OD+j/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAADg/o/0RC//0cE+X/Dg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAA/////xQW5/8tMOT/Njfw/0BA+v9JSP//UU///1hT//9aVv3/RUL5/zQy+f8zNPH/JSHa/w4P6P8AAAAAAAAAAAAAAAAAAAAA/////xAR5v0UFeL/Hh7v/Soo+P80Mf39PDn+/0I+//05NPn/F5sr/zlO0/08PeL/NDbb/Rwdyv8OD+j/AAAAAAAAAAAAAAAA/////w4P6P8XGOn/Hh7x/yQk9f8rKvX/MjD1/zk0+f85NPn/F5sr/xebK/8lQ6n/Hx/D/w4P6P8AAAAAAAAAAAAAAAAAAAAA/////w4P6P8OD+j/Dg/o/w4P6P8OD+j/Dg/o/w4P6P8OD+j/F5sr/zfyX/0Xmyv/Dg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAA/////33EgP+W8J//m/Sk/6D5qv+k/K7/qPyz/6z8uP9t2H7/QuJf/zz/Xv8f7UX/F5sr/wAAAAAAAAAAAAAAAAAAAAAAAAAA/////wOQFP8f5D3/KexI/zL3U/87/V3/Qf9k/0T/aP9K/2v/Qf9j/zn5Wf8571X/Kt1J/xebK/8AAAAAAAAAAAAAAAAAAAAA/////weUGf0Y6Tj/IvNE/Sn6Tv81/lj9Pv9h/0X9Z/1H/mf/Rvpk/0HvXP064VP/MtZL/RrHN/8Xmyv/AAAAAAAAAAAAAAAA/////wmYHP8JmBz/CZgc/wmYHP8JmBz/CZgc/wmYHP8JmBz/CZgc/zjgUf8x1kj/FMIy/xebK/8AAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAAKL08/zDXSP0NvCz/F5sr/wAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAAHKsv/xS9Lv8Xmyv/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAAF5sr/xebK/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAAAAAAAAAAAAAAAAAF5sr/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//8AAg9/AAIPPwACDx8AAg8PAAIABwACAAMAAgAHAAIADwACAA8AAgAHAAIAAwACAAcAAg8PAAIPHwACDz8AAg9/AAP//wAA="], ["Импорт закладок из HTML-файла", "import", "data:image/x-icon;base64,AAABAAEAEhIAAAEAIACABQAAFgAAACgAAAASAAAAJAAAAAEAIAAAAAAAWAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAADg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8OD+j/Dg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////w4P6P81Kuj/Dg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////Dg/o/xwT5f9EQv/9Dg/o/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////8OD+j/JSHa/zM08f80Mvn/RUL5/1pW/f9YU///UU///0lI//9AQPr/Njfw/y0w5P8UFuf/AAAAAAAAAAAAAAAA/////w4P6P8cHcr/NDbb/Tw94v85TtP9F5sr/zk0+f9CPv/9PDn+/zQx/f0qKPj/Hh7v/RQV4v8QEeb9AAAAAAAAAAAAAAAA//////////8OD+j/Hx/D/yVDqf8Xmyv/F5sr/zk0+f85NPn/MjD1/ysq9f8kJPX/Hh7x/xcY6f8OD+j/AAAAAAAAAAAAAAAA////////////////Dg/o/xebK/838l/9F5sr/w4P6P8OD+j/Dg/o/w4P6P8OD+j/Dg/o/w4P6P8OD+j/AAAAAAAAAAAAAAAA////////////////F5sr/x/tRf88/17/QuJf/23Yfv+s/Lj/qPyz/6T8rv+g+ar/m/Sk/5bwn/99xID/AAAAAAAAAAAAAAAA//////////8Xmyv/Kt1J/znvVf85+Vn/Qf9j/0r/a/9E/2j/Qf9k/zv9Xf8y91P/KexI/x/kPf8DkBT/AAAAAAAAAAAAAAAA/////xebK/8axzf/MtZL/TrhU/9B71z9Rvpk/0f+Z/9F/Wf9Pv9h/zX+WP0p+k7/IvNE/RjpOP8HlBn9AAAAAAAAAAAAAAAA//////////8Xmyv/FMIy/zHWSP844FH/CZgc/wmYHP8JmBz/CZgc/wmYHP8JmBz/CZgc/wmYHP8JmBz/AAAAAAAAAAAAAAAA////////////////F5sr/w28LP8w10j9KL08/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////xebK/8UvS7/HKsv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8Xmyv/F5sr/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////8AAAAAF5sr/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//8AAgv/AAID/wACA/8AAgP/AAIAAwACAAMAAgADAAIAAwACAAMAAgADAAIAAwACAAMAAgP/AAID/wACA/8AAgv/AAP//wAA="], , ["Открыть папку для экспорта закладок", "reveal", "data:image/x-icon;base64,AAABAAEAEhIAAAEAIACABQAAFgAAACgAAAASAAAAJAAAAAEAIAAAAAAAWAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAABAAAAAWAAAAFQAAABQAAAAUAAAAEwAAABIAAAASAAAAEQAAABAAAAAPAAAADwAAAA4AAAALAAAAAwAAAAAAAAAHAAAALAAAAFUAAABjAAAAYgAAAGEAAABgAAAAYAAAAF0AAABcAAAAWwAAA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ExL3Pz8/Ozs7Oz9DQ0NPFxcXCYGBgbgAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALi4uAR0dHQEREREEEhISBRAQEAMaGhoCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//8AAgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAB/wACB/8AA///AAP//wAA="], ["Экспорт закладок в HTML без запроса", "silentExport", "data:image/x-icon;base64,AAABAAEAEhIAAAEAIACABQAAFgAAACgAAAASAAAAJAAAAAEAIAAAAAAAWAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAHAAAAAwAAAAAAAAANAAAAMwAAAEsAAABOAAAATgAAAE4AAABOAAAATgAAAE4AAABOAAAATgAAAE4AAABOAAAATgAAAE8AAABKAAAAMQAAAAwAAAAuLCwsl2tra89nZ2fNZ2dnz2dnZ89nZ2fPZ2dnz2dnZ89nZ2fPZ2dnz2dnZ89nZ2fPZ2dnz2dnZ81sbGzPKCgokwAAACsAAABHy8vL/7+/v/+/v7//v7+//729vf+/v7//v7+//7+/v/+/v7//v7+//76+vv++vr7/vr6+/7+/v/+/v7//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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//8AAgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAwACD/8AA///AAP//wAA="] ]) if (data) { var menuitem = popup.appendChild(document.createXULElement("menuitem")); menuitem.className = "menuitem-iconic"; keys.forEach((key, ind) => menuitem.setAttribute(key, data[ind])); } else popup.append(document.createXULElement("menuseparator")); ChromeUtils.defineESModuleGetters(this, { BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs" }); delete this.popup; return this.popup = self.appendChild(popup); }, pref: "CB.exportsBookmarksToHTMLFile.path", get path() { return Services.prefs.getStringPref(this.pref, null); }, pick(title, modeOpen) { var fp = makeFilePicker(); fp.init(window.browsingContext, title, modeOpen ? fp.modeOpen : fp.modeGetFolder); modeOpen && fp.appendFilters(fp.filterHTML); var {path} = this; if (path) fp.displayDirectory = FileUtils.File(path); return new Promise(resolve => fp.open( res => resolve(res == fp.returnOK && fp.file) )); }, async import() { var file = await this.pick("Выберите HTML-файл для импорта закладок", true); file && this.BookmarkHTMLUtils.importFromFile(file.path).then(null, alert); }, async export(justSetPath) { var dir = await this.pick("Укажите папку для экспорта закладок!"); if (!dir) return; dir.path != this.path && Services.prefs.setStringPref(this.pref, dir.path); justSetPath || this.silentExport(dir); }, silentExport(dir) { if (!dir && !(dir = this.checkPath(this.path))) return; dir.append("bookmarks-" + new Date().toLocaleDateString("mn") + ".html"); this.BookmarkHTMLUtils.exportToFile(dir.path) .then(() => this.notify(dir.path), alert); }, ns: "Папка для экспорта не установлена.\n\nУстановить папку?", nf: path => `Папка для экспорта не найдена.\n${path}\n\nВыбрать другую?`, checkPath(path, justSetPath) { if (!path) return void(confirm(this.ns) && this.export(justSetPath)); var dir = FileUtils.File(path); if (dir.exists() && dir.isDirectory()) return dir; confirm(this.nf(path)) && this.export(justSetPath); }, reveal() { var dir = this.checkPath(this.path, true); dir && dir.reveal(); }, get notify() { var as = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); var func = path => setTimeout(as.closeAlert, 3500, as.showAlertNotification( self.image, self.label, "Экспортировал закладки как HTML в " + path )); delete this.notify; return this.notify = func; } });
Отсутствует
Dumby
Добрый день . Возможно исправить кнопку..."Двойным левым кликом на папке закладок добавлять закладку в папку закладок" в 105.0.1 (64 бита) работает а в 115.0.3 (64-разрядный) нет.
// Двойным левым кликом на папке закладок добавлять закладку в папку закладок, от 06.06.2019. ...................... addEventListener("dblclick", (e, targ = e.originalTarget)=> { if ( e.button || !targ._placesNode || !PlacesUtils.nodeIsFolder(targ._placesNode) ) return; var docTitle = gBrowser.selectedTab.label.substr(0, 50); var folderId = PlacesUtils.getConcreteItemId(targ._placesNode); var folderTitle = PlacesUtils.bookmarks.getItemTitle(folderId); var currentURI = Services.io.newURI(gBrowser.currentURI.spec, null, null); PlacesUtils.bookmarks.insertBookmark(folderId, currentURI, 0, docTitle); // всплывающая подсказка .... var favicon = gBrowser.selectedTab.image || "chrome://global/skin/icons/Portrait.png"; var as = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); var name = "bookmarks-alert-" + Date.now(); as.showAlertNotification( favicon, "Добавил в папку " + folderTitle + ":", docTitle, false, null, null, name ); setTimeout(() => as.closeAlert(name), 2e3); });
Отсутствует
Duche
Что-то особо проверять не хочется, но попробуй так
(defImg => { var bookmark = async node => { var title = gBrowser.selectedTab.label.slice(0, 50); var parentGuid = PlacesUtils.getConcreteItemGuid(node); await PlacesTransactions.NewBookmark({ parentGuid, index: 0, title, url: gBrowser.currentURI.spec }).transact(); notify(title, `Добавил в папку ${ PlacesUtils.bookmarks.getLocalizedTitle({guid: parentGuid, title: node.title}) }:`); } var notify = (...args) => { var name = "alert-bkmrk-added"; var as = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService); var close = as.closeAlert.bind(null, name); (notify = (title, msg) => { as.showAlertNotification( gBrowser.selectedTab.image || defImg, msg, title, false, null, null, name ); setTimeout(close, 2e3); })(...args); } var isFolder = PlacesUtils.nodeIsFolder || PlacesUtils.nodeIsFolderOrShortcut; addEventListener("dblclick", e => { var node = e.target._placesNode || e.target._placesView?._resultNode; node && isFolder(node) && bookmark(node); }); })("chrome://global/skin/icons/Portrait.png");
Отсутствует
Dumby
Добрый день . Возможно исправить маленькие кнопки для 115.0.3 (64-разрядный).
"Закрыть все вкладки и открыть домашнюю"
/*CODE*/ [...gBrowser.tabs].forEach((tab)=> !tab.pinned && gBrowser.removeTab(tab)); /*закрыть все вкладки*/ var url = "https://ya.ru"; openUILinkIn(url, 'current', { triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal() }); /*Закрытие всех вкладок приводило к открытию домашней страницы*/
"Закрыть другие вкладки кроме активной"
Отсутствует
Добрый день . Как исправить вот такое "чудо" ломаное окно CB 0.0.7.0.0.26 , с чего появилось не пойму . Отключал стили, userChrome тоже. Если окно создания новой кнопки пустое то окно целое ,стоит добавить любой код, вот такое. Несмотря на окно, кнопки все рабочие.
Отредактировано Duche (20-12-2024 18:23:45)
Отсутствует
Как исправить вот такое "чудо" ломаное окно CB 0.0.7.0.0.26
Для начала обновить CB до версии 0.0.7.0.0.31
Add, CB 0.0.7.0.0.31
Отредактировано kokoss (20-12-2024 21:53:32)
Win7
Отсутствует
0.0.7.0.0.34 https://forum.mozilla-russia.org/viewto … 28#p811228
Отсутствует
Duche
При закрытом Firefox, удалить папку startupCache из Локального каталога профиля.
Отсутствует
У кого то здесь уже вроде была похожая проблема!
Было неотображение названий нижних четырех табов (Код, Инициализация...), но на работу не влияло. Когда-то давно это фиксилось, в последующих версиях СВ снова проявлялось.
Отсутствует
Как исправить вот такое "чудо"
По-моему победил это "чудо". На 115 удалил СВ , закрыл FF, удалил папку startupCache, загрузил FF, заново установил СВ ,загрузил файл с кнопками и вуаля всё заработало. Вот такая эпидерсия. Спасибо всем помогавшим .
<
Отредактировано Duche (22-12-2024 17:50:46)
Отсутствует
Dumby - приветствую и с Наступающим НГ!
Вопрос про пароли – как получить в js из страницы about:logins# даты:
«Создан» ..... «Использован», для сайта и имени пользователя, например vk.com и +7... ???
Отсутствует
Dobrov
Можно использовать nsILoginManager, чтобы получить массив nsILoginInfo.
Они квериинтерфейснуты nsILoginMetaInfo, что добавляет в том числе и даты.
То есть, либо await Services.logins.searchLoginsAsync({…});
либо получаешь все: await Services.logins.getAllLogins(); и ищешь сам.
Отсутствует
Dumby
Как избавиться от пункта User Agent
Забыл...
/*Initialization 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 // Ctrl+Click или правый клик - сброс параметра по-умолчанию //стиль иконки: #QuickToggleAboutConfigSettings .toolbarbutton-icon{ padding: 2px !important;} (async (name, id, func) => { if (name == "Object") return CustomizableUI.createWidget(func()); var win = name == "Window", g = Cu.getGlobalForObject(Cu); 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, "QuickToggleAboutConfigSettings", () => { // 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"; var icon_vpn = "hue-rotate(270deg) brightness(95%)"; function Notify(title, text, time){ Components.classes['@mozilla.org/alerts-service;1'].getService(Components.interfaces.nsIAlertsService).showAlertNotification(null, title, text, false, '', null, time); } function Antizapret(trg){ if (prefs.getIntPref('network.proxy.type') == 2) { // выключить prefs.setIntPref('network.proxy.type', 0); prefs.setStringPref("network.proxy.autoconfig_url", "127.0.0.1"); trg.style.filter = ''; Notify('Proxy', 'Режим по-умолчанию', 2000); } else { prefs.setIntPref('network.proxy.type', 2); prefs.setStringPref("network.proxy.autoconfig_url", "https://antizapret.prostovpn.org/proxy.pac"); trg.style.filter = icon_vpn; Notify('Proxy', 'Работаем через VPN Антизапрет', 2000); } } var useragent = Components.classes["@mozilla.org/network/protocol;1?name=http"].getService(Components.interfaces.nsIHttpProtocolHandler).userAgent; // текущий юзерагент //===================================================================================== // refresh: // false - reload current tab // true - reload current tab skip cache // // restart: // false - restart browser // true - restart browser with confirm //===================================================================================== var secondary = [{ 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: ["image.http.accept", "Графика webp"], userChoice: "", userAlt: "*/*", values: [ ["", "Сохранять молча", "", "", `prefs.setBoolPref("image.webp.enabled", true)`], ["image/png,image/*;q=0.8,*/*", "Конверсия в png", "", "Запрет передачи изображений в формате webp", `prefs.setBoolPref("image.webp.enabled", false)`], ["*/*", "Выбирать формат", "", "Или установите расширение\nSave webP as PNG or JPEG"] ]},{ pref: ["browser.display.document_color_use", "Использовать цвета сайтов"], userChoice: 0, values: [[0, "Авто", "0"], [1, "Всегда", "1"], [2, "Никогда", "2"]] },{ 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: ["gfx.webrender.all", "WebRender для всего"], userChoice: false, refresh: true, values: [[true, "Да"], [false, "Нет"]] },null,{ pref: ["javascript.enabled", "Выполнять скрипты Java"], userChoice: true, refresh: true, values: [[true, "Да"], [false, "Нет"]] },{ pref: ["network.cookie.cookieBehavior", "Cookies"], userChoice: 1, userAlt: 3, refresh: false, values: [ [1, "Не принимать сторонние"], [3, "Не принимать с не посещенных"], [4, "Не принимать от трекеров"], [2, "Не принимать со всех"], [0, "Принимать со всех"] ]},{ pref: ["dom.enable_performance", "Статус загрузки страницы"], userChoice: false },{ pref: ["dom.storage.enabled", "Локальное хранилище"], userChoice: true },{ pref: ["network.http.sendRefererHeader", "Referer - для чего"], userChoice: 1, values: [[0, "Ни для чего", "0"], [1, "Только ссылки", "1"], [2, "Ссылки и изобр.", "2"]] },{ pref: ["media.peerconnection.enabled", "WebRTC утечка IP"], userChoice: false },{ pref: ["general.useragent.override", "User Agent"], userChoice: true, refresh: true, values: [ (arr => { var pref = "general.useragent.override"; var has = prefs.prefHasUserValue(pref); if (has) { var val = prefs.getStringPref(pref); prefs.clearUserPref(pref); } var ua = Components.classes["@mozilla.org/network/protocol;1?name=http"] .getService(Components.interfaces.nsIHttpProtocolHandler).userAgent; has && prefs.setStringPref(pref, val); var find = node => node.pref && node.pref.pref == pref; var redef = (doc, ttt) => { var popup = doc.getElementById("QuickToggleAboutConfigSettings-secondaryPopup"); var menuitem = Array.from(popup.children).find(find).menupopup.firstChild; menuitem.tooltipText = ttt ? ua + "\n" + ttt : ua; menuitem.setAttribute("oncommand", `event.stopPropagation(); this.closest("toolbarbutton").linkedObject.contextmenu({ preventDefault: Boolean, target: this.parentNode.parentNode });` ); } Object.defineProperty(arr, "0", {enumerable: true, get() { if (Components.stack.formattedStack.includes("createRadios")) { var win = Services.wm.getMostRecentWindow("navigator:browser"); win.setTimeout(redef, 0, win.document, this[3]); } else return ""; }}); return arr; })([null, "По-умолчанию"]), ["Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0", "Firefox 56"], ["Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0", "Firefox 56 Linux"], ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Firefox/68.0", "Firefox 68 MacOSX"], ["Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)", "MSIE 6.0 Windows"], ["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 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30", "Safari 6 MacOSX"], ["Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12 Version/12.16", "Opera12 W8"], ["Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36", "Chrome57 W7"], ["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 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"], ["Mozilla/5.0 (PlayStation 4 3.11) AppleWebKit/537.73 (KHTML, like Gecko)", "Playstation 4"], ["Xbox (Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/13.10586", "Xbox One (mobile)"], ["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 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; GT-I8350)", "Windows Phone"], ["Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)", "GoogleBot"] ]} ]; return { label: "Quick Toggle Settings", id: "QuickToggleAboutConfigSettings", tooltiptext: `Quick Toggle Settings ЛКМ Боковая панель: Журнал ЛКМ+Shift Окно: весь Журнал ПКМ Меню основных настроек СКМ Окно: Панель закладок Long Антизапрет proxy`, localized: false, image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAAGXcA1uAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAdeSURBVHjaACcA2P8AbW1r2J6UnfEBAQEAAH9/feRepVj/4Zcn/wCCgX/k7+/v//+7KP8AAAD//wAnANj/AIuKifGIiIbxAAAAAACyv7f//////xUVFG8A7Ozs/+vIe/+vezrUAAAA//8ASwC0/wCQiI7kUp9P/2G5U//2/fb/s7S0/w8QEBIAgYB/5PHx8f/jzKn/6caJ///oev9NKiKFAIqIhuTu7e3/7+/v//WzPf/Dom7/ZzEJwAAAAP//JMk/CwFxAMfhL0mSRRbvglImsxfgFVjMFn9uMIkwyiqyobwBVpnuFoOyooT86uTOcOlj8KyPBv2euxjN3U637TYb9ZukkCSptbawLiWqqwqO4zCdTJAkAZTPeQD29gbgH0EQ8PY8vo85fIY4/RqZVFjyfR9jDNf7C7YF2OXIpqMJ+Z6HMU9OR5vlbAyHIvFYJPljO/5dEgjjAA5/Cxtu8aIcCm5yE6JZlMbm/oegpYZqiBbr9AjCOUIQG6q1tqAabGrVhhYhXOqt9N77lcLFGfZpcuvZHrHtAwXQem6TvhNW6wUmtKe5vDjHNM20TDSqDbXymKPqblDv7eO8rrPWytMdd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WnUWR4ALVpAwct5RyeOUCz9UM+nalg9+TTFBseJL/nca65ri8Nv4TodOK4OYvVZgNAr9eTmppaEVVBY32DZWJ6nErd++w/sYdXju1EfX4bH0y9wL4/t1Gme55d2l3sbXmT2k4NUkhalGjsd8aOqTEcKccyuQjt1HWQnLz6rRUS3dqDC8P9bGp+gvX9KazrTGNL07OMmyai9LdOzfDXyHFwvsOcLouR1moA+vr6SEm57+0oQE1NtUWSFn8lSRKBQCAqmdsygfniSa6eP45xQMdwTxej+haC9kbgEzC9hOnL9VjGBhg0GHkoI2O3IAhCfOIqobTo/sUl6XK58Hg8OBwORFFEFEWcc3OIznmuDukxDzQQ9jYCdeCrBV89eBrB9xW4G/Fd/hhrayVXvnmP3sqXp069puo6sjX75Beb0w9EAex2Ow6HI2I7URSZn3djv+niysDP/D1Yx4KtHmY/A8t+FkxlYChkYUgGv6yDXzPhDyW+IVXwh4ObzpQWpBVHAJLkwWaz4XA4IjZdhrjm3dywO/mt5wSzHTvgJzm0ZUL7o/DjY9CtZEGfR0ftczz58JqqxFWCcO/d8YJalb7UA7e0NN9e/H4/fr+fQDBIMBQiHA4TAqzTU1g73oVTa0EnY/r0dsa/fxVJXwiXcuGSCuOhbHKS47SCIMgS42OTczOTbhMK8vMalMqcswqFvE2pyFlxcuTyNoVCcfr17QVn6/bmD71YIu/Jzd14ZnNhUXvBM4VtSuXG9s/35Ju5uBV6i2nakXL9rjihVLn2TuHrNzL+w97/EzExK3fRHbfHCLI1q+9pUG/46HD5Iy3K9Li85ft/BgCgAJvUrkqRFQAAAABJRU5ErkJggg==", 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, "secondary", secondary); this.createCloseMenusOption(doc, btn); if (prefs.getIntPref('network.proxy.type') == 2) btn.style.filter = icon_vpn; // btn.style.cssText = "background-image: -moz-linear-gradient(#c0c8c0, #c0c8c0, #c0c8c0) !important"; btn.linkedObject = this; for(var type of ["command", "contextmenu", "mousedown", "auxclick"]) btn.setAttribute("on" + type, `linkedObject.${type}(event)`); this.addSheet(btn); }, addSheet(btn) { var cb = Array.isArray(btn._destructors); var id = cb ? btn.id : "QuickToggleAboutConfigSettings"; var css = `#${id} menu[_moz-menuactive] { color: white !important; }`; var args = [ "data:text/css;charset=utf-8," + encodeURIComponent(css), Components.interfaces.nsIDOMWindowUtils.USER_SHEET ]; if (cb) var destructor = function() { this.removeSheetUsingURIString(...args); } var add = b => b.ownerGlobal.windowUtils.loadSheetUsingURIString(...args); (this.addSheet = !cb ? add : btn => { add(btn); btn._destructors.push({destructor, context: btn.ownerGlobal.windowUtils}); })(btn); }, 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`]; 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+xhhLi4TIrgjgIzwe4MbgmR2nrZMtxxEN63zYOR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LQId8nw+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", "#804040", "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}"`; } lab = exists ? lab : '['+ lab +']'; // имя = [имя] если преф не существует 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) { // LMB var trg = e.target; // if (trg.btn) return this.openPopup(trg.primaryPopup); if (trg.btn) { // Переключить боковую панель if(e.shiftKey) // +Shift e.view.PlacesCommandHook.showPlacesOrganizer("History") else { var win = e.target.ownerDocument.defaultView; var bar = e.target.ownerDocument.querySelector("#add-additional-vertical-bar"); // if (bar) win.setToolbarVisibility(bar, bar.collapsed); bar.collapsed ? win.SidebarUI.hide('viewHistorySidebar') : win.SidebarUI.show('viewHistorySidebar'); return; } } 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) { // RMB 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; }, auxclick(e) { // CKM if (e.button != 1 || !e.target.btn) return; e.view.PlacesCommandHook.showPlacesOrganizer("BookmarksToolbar"); }, mousedown(e) { var reset = e => e.target.linkedObject = this; var id, lo = {command: reset, mousedown: reset}; var lin = /macos|linux/.test(e.view.AppConstants.platform); 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) { // удержание кнопки мыши, выбирать команды, отводящие мышь от кнопки // e.view.alert("Long " + e.button); var msg = "QuickSettings\nLONG PRESS: e.button = " + e.button; if (e.button == 0) Antizapret(e.target); } }; }); // END код кнопки
Отсутствует
В 134.b9 перестало работать расширение add toolbar buttons.2024.10.14.21.
Посмотри пожалуйста.
Развернул бету 134.0b10, поставил ATB 2024.10.14.21
Не вижу, чтобы расширение перестало работать.
Кнопки создаются, страница настроек на месте.
Может слетела настройка extensions.experiments.enabled
Или может отвалилась какая-то конкретная кнопка,
тогда говори какая именно, я же не буду проверять их все.
Как избавиться от пункта User Agent
В строке 115 удалить открывающую фигурную скобку {
И удалить строки со 116-ой по 167-ю (включительно).
Отсутствует
Dumby
Может слетела настройка extensions.experiments.enabled
Или может отвалилась какая-то конкретная кнопка,
Настройка включена, расширение устанавливается, но кнопки не создаются. Все остальное работает.
На 133 проблем не было.
Отсутствует