font-size
Намекаешь, что надо через userChrome.css регулировать? Эт я сделал, шрифт уменьшил, иконки приобрели нормальный вид. А в саму кнопку не можешь добавить регулировку шрифта, или сделать, чтоб она не влияла на другие иконки?
иконки от дополнений
???
Ну иконки от дополнений, которые их пихают в адресную строку. У меня это Scroll Up Folder и Save-To-Read
Отсутствует
Ну вот например открывается в контенере несколько вкладок
Потом все вкладки закрываются а контейнер созданный остается существовать
Можно ли сделать чтобы после закрытия последней вкладки контейнера он удалялся?
Что-то я сомневаюсь, что смогу это записать.
(async (sel, self) => ({ icon: "circle", colors: [ "mediumseagreen", "silver", "crimson", "blue", "peru", ], initColors() { var colorName = "ucf-gen"; var css = "@-moz-document url(about:preferences#containers)," + " url-prefix(chrome://browser/content/browser.x) {\n"; this.colors.forEach((color, ind) => { var [ic, tc] = color.split(/\s*\|\s*/); css += `\t.identity-color-${colorName}${ind} {\n` + `\t\t--identity-tab-color: ${tc || ic};\n` + `\t\t--identity-icon-color: ${ic};\n\t}\n` }); var url = "data:text/css;charset=utf-8," + encodeURIComponent(css + "}"); var sss = Cc["@mozilla.org/content/style-sheet-service;1"] .getService(Ci.nsIStyleSheetService); sss.loadAndRegisterSheet(Services.io.newURI(url), sss.USER_SHEET); var len = this.colors.length; var pref = "ucf.openInGeneratedContainer.lastColor"; var ind = Math.min(Services.prefs.getIntPref(pref, -1), len - 1); this.nextColor = () => { var next = ind + 1; Services.prefs.setIntPref(pref, ind = next == len ? 0 : next); return colorName + ind; } }, quit: false, init(topic) { Services.obs.addObserver(self = this, topic); Services.obs.addObserver(function quit(s, t) { self.quit = true; Services.obs.removeObserver(self, topic); Services.obs.removeObserver(quit, t); }, "quit-application-granted"); this.initColors(); this.newUsercontext = name => { var id = this.cis.create( name || `[ ${this.cis._lastUserContextId + 1} ]`, this.icon, this.nextColor() ).userContextId; this.saveGens(this.gens.add(id)); return id; } var cpref = "ucf.openInGeneratedContainer.containers"; this.gens = new Set( Services.prefs.getStringPref(cpref, "").split(",").map(Number).filter(Boolean) ); this.saveGens = () => Services.prefs.setStringPref(cpref, Array.from(this.gens).join(",")); }, observe(doc) { var list = doc.querySelectorAll(sel); if (!list.length) return; var menuitem = doc.createXULElement("menuitem"); for(var args of Object.entries({ selectiontype: "single", oncommand: "cmd(window)", nodetype: "folder|query", selection: "folder|query", label: "Открыть всё в контейнере", id: "placesContext_openContainer:tabs:newUsercontext" })) menuitem.setAttribute(...args); menuitem.cmd = this.cmd; menuitem.rnd = menuitem.constructor.prototype.render; menuitem.render = this.render; var [m1, m2] = menuitem.list = Array.from(list); (m2 || m1).after(menuitem); if (doc.documentElement.getAttribute("windowtype") != "navigator:browser") return; for(var btn of [ doc.getElementById("tabs-newtab-button"), doc.getElementById("new-tab-button") || doc.ownerGlobal.gNavToolbox.palette.querySelector("#new-tab-button") ]) if (btn) btn.checkForMiddleClick = this.click; var win = doc.ownerGlobal; this.redefDoSearch(win, win.customElements.get("searchbar").prototype); win.gBrowser.tabContainer.addEventListener("TabClose", this.tabClose); win.addEventListener("unload", this.winUnload, {once: true}); }, winUnload(e) { var win = e.target.ownerGlobal; win.removeEventListener("TabClose", self.tabClose); if (self.quit) return; var gb = win.gBrowser; if (gb) for(var tab of gb.tabs) self.tabClose(null, tab); }, closed: new Set(), cis: ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm") .ContextualIdentityService, tabClose(e, tab = e.target) { var id = +tab.getAttribute("usercontextid"); id && self.gens.has(id) && self.closed.add(id); self.closed.size == 1 && ChromeUtils.idleDispatch(self.meaybeRemove); }, meaybeRemove() { var ids = Array.from(self.closed); self.closed.clear(); for(var id of ids) self.meaybeRemoveById(id); }, meaybeRemoveById(id) { for(var win of CustomizableUI.windows) if (win.document.querySelector(`tab.tabbrowser-tab[usercontextid="${id}"]`)) return; this.saveGens(this.gens.delete(id)); this.cis.remove(id); }, redefDoSearch(win, proto) { var code = `(openTrustedLinkIn => [ {${proto.doSearch}}, openTrustedLinkIn ])( function otl(url, where, params) { if (where != "current") params.userContextId = otl.newUsercontext( document.getElementById("searchbar").value ); openTrustedLinkIn(url, where, params); } );`; (this.redefDoSearch = (win, proto) => { var [obj, func] = win.eval(code); Object.assign(proto, obj); func.newUsercontext = this.newUsercontext; })(win, proto); }, click(btn, e) { if (!(e.button != 2 || e.ctrlKey || e.shiftKey)) { var txt = e.view.readFromClipboard(); if (txt) { var urls = txt.split("\n").map(self.map).filter(Boolean); if (urls.length) return e.preventDefault(), self.openFromClipboard(e.view, urls); } } e.view.checkForMiddleClick(btn, e); }, eo: Object.create(null), map(str) { str = str.trim(); try { var scheme = Services.io.extractScheme(str); var ph = Services.io.getProtocolHandler(scheme); if (ph.scheme == scheme) return Services.io.newURI(str) && {uri: str}; } catch {} }, openFromClipboard(win, urls) { if (win.OpenInTabsUtils.confirmOpenInTabs(urls.length, win)) urls.load = true, this.open(win, this.eo, urls); }, async render() { this.rnd(); await new Promise(this.ownerGlobal.requestAnimationFrame); this.hidden || (this.hidden = this.list.every(self.every)); }, every: node => node.disabled || node.hidden, cmd(win) { var view = this.parentNode._view; var node = win.document.popupNode; node = node._placesView && node._placesView.result.root; self.open(win, node || view.selectedNode || view.result.root); }, open(win, node, list) { var gbw = Cu.import("resource:///modules/PlacesUIUtils.jsm", {}).getBrowserWindow; var w = gbw(win); this.pu = w.PlacesUIUtils; this.fs = w.PlacesUtils.favicons; this.sysp = w.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL; (this.open = (win, node, list) => { this.openURLs(gbw(win), list || win.PlacesUtils.getURLsForContainerNode(node)); node.bookmarkGuid && this.pu.doCommand(win, "placesCmd_delete"); })(win, node, list); }, async openURLs(win, urls) { var userContextId = this.newUsercontext(); var mark = !win.PrivateBrowsingUtils.isWindowPrivate(win); var {load} = urls, gb = win.gBrowser, pos = gb.selectedTab._tPos; for(var {uri, title, isBookmark} of urls) try { if (mark) isBookmark ? this.pu.markPageAsFollowedBookmark(uri) : this.pu.markPageAsTyped(uri); if (load) { gb.addTrustedTab(uri, {index: ++pos, userContextId}); continue; } var state = {userContextId, entries: [{ url: uri, title: title || uri, triggeringPrincipal_base64: this.sysp }]}; var [,, data, mime] = await new Promise( resolve => this.fs.getFaviconDataForPage( Services.io.newURI(uri), (...args) => resolve(args), 16 ) ); if (data.length) state.image = `data:${ mime || "image/x-icon" };base64,${ btoa(String.fromCharCode(...data)) }`; var tab = gb.addTrustedTab(null, {index: ++pos, userContextId}); win.SessionStore.setTabState(tab, state); } catch {}; } }).init("chrome-document-loaded"))( "#placesContext_openBookmarkContainer\\:tabs,#placesContext_openContainer\\:tabs" );
Ну иконки от дополнений, которые их пихают в адресную строку. У меня это Scroll Up Folder и Save-To-Read
Вот так у меня выглядит на нестилизированном профиле (сверху).
Но, если принудительно выкрутить font-size, то да, вытягивает (снизу).
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT0AAACeCAIAAADPBko+AAAuXElEQVR42u2dCVxN6f/Hn2pa0cKfGSVaLn5cawvDoKJUlskwMpayjChCGNqMylhixgjZ/TBk5idmRrKUMknWCGOm8RtuYaIsP22oe1P3/r/nPnWc7rlb2711PZ9Xr/v6nmc73/N03uf7PM+59xyt0levERFR85aWlhb9yTTkSCQSqdvrpuyQ4pJSdftARCRPTGi1xEIy0GWyquHcviwsUrcPREQyxcSVKcRCF4PK/NRgad24cUPdPhARKZauru6HH31kaGgkQS+WSKzy8vKC/Cdv375Vt7NNLi2NvzI1H5WUlDRKOyYmJuo+FDWorKyMx+N17mKlra0NxMInqgm5dIzNzeFxOBwjIyN1O9vkItyqToTbBiorK8vGlqMtFjPkimp07+//2tvbq9tNVYhwqzoRbhso4Nbaxla7RhLcCoXC+/f+JtwSNbIItw0UcGtlbQPE6ujo4KEyzS1AC5/15nZ9buSl4vRLRec/MXMeYua83DpC3ceqQIRb1UmC28uF1w78c4j3JvetUPo6ip6OXtdWnC+7THc0tWOmK8ntgR8OwueM6b7qPu5GE3DbxcoaoKVDLk6n4y3v/j2F3N69e/fBgweFhYVgW1hYODk5OV+3y379O7NMr9b90gfeUv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492XbsqVSJIAAAAAElFTkSuQmCC
А в саму кнопку не можешь добавить регулировку шрифта, или сделать, чтоб она не влияла на другие иконки?
Ну, я же не владею какой-то высокой CSS-магией,
но, чтобы не влияла, вроде как работает min-height.
(async id => ({ style: `@-moz-document url(chrome://browser/content/browser.xhtml) { #${id} { min-height: 0 !important; } #${id}-label { font-size: 22px !important; } }`, delay: 2e3, 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( `<hbox id="${id}"><label id="${id += "-label"}"/></hbox>` ); Cc["@mozilla.org/content/style-sheet-service;1"] .getService(Ci.nsIStyleSheetService) .loadAndRegisterSheet(Services.io.newURI( "data:text/css;charset=utf-8," + encodeURIComponent(this.style) ), Ci.nsIStyleSheetService.USER_SHEET); delete this.style; this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); (this.observe = async win => { this.timer.cancel(); await new Promise(ChromeUtils.idleDispatch); win.document.getElementById("star-button-box") .after(win.document.importNode(df, true)); 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) { var lab = win.document.getElementById(id); if (lab) lab.value = this.val; } }, mgb: bytes => bytes < 1073741824 ? Math.round(bytes / 1048576) + "MB" : (bytes / 1073741824).toFixed(2) + "GB" }).init("browser-delayed-startup-finished"))("ucf-mem-indicator");
Отсутствует
Что-то я сомневаюсь, что смогу это записать.
Так работает же, класс, спасибо, благодарю!
UPD
Блин, после перезагрузки браузера контейнеры удаляются даже те в которых открыты вкладки
Отредактировано Stkvsky (23-04-2021 15:31:20)
Отсутствует
Многие сайты показывают Картинки под div, которые нельзя сохранить.
Посоветуйте, каким расширением или user-скриптом сохранять такие картинки или убрать перекрывающий элемент страницы?
На данном сайте (https://mose.live) при клике по постеру открываются фото, которые нельзя сохранить.
Отредактировано Dobrov (23-04-2021 14:10:20)
Отсутствует
Многие сайты показывают Картинки под div, которые нельзя сохранить.
Посоветуйте, каким расширением или user-скриптом сохранять такие картинки или убрать перекрывающий элемент страницы?На данном сайте (https://mose.live) при клике по постеру открываются фото, которые нельзя сохранить.
Можно сделать скрин.
Отсутствует
Подскажите по кнопе AutoCopy. Может кто всё лишнее убрать из кода, нужна только функция автокопирования в буфер.
this.closest("toolbarpaletteitem") || (script => { var id = `CB${_id.slice(20)}:Autocopy`, pid = id + "Parent"; var nsvoStr = `Components.utils.import("resource://gre/modules/Services.jsm", {})`; var nsvo = eval(nsvoStr), {Services} = nsvo, parent = nsvo[pid]; if (!parent) { var cid = id + "Child", u = code => "data:," + encodeURIComponent(code); var pref = "CB.Autocopy.settings", topic = "quit-application-granted"; var PREF_ENABLED = 1; (parent = nsvo[pid] = { init() { this.readSettings(); if (!this[PREF_ENABLED]) return; this.initChild(); }, destroy(reason) { var ud = reason[5] == "e"; if (ud || !this.obsAdded) this.saveSettings(); delete nsvo[pid]; if (reason == "delete") Services.prefs.clearUserPref(pref); if (!this[PREF_ENABLED]) return; this.destroyChild(); }, get processURL() { delete this.processURL; this.frameURL = u(`${nsvoStr}["${cid}"].init(this);`); return this.processURL = u(script.replace(/%ID%/g, cid) .replace("%NSVO%", nsvoStr) ); }, get frameURLDestroy() { delete this.frameURLDestroy; this.processURLDestroy = u(`${nsvoStr}["${cid}"].forget();`); return this.frameURLDestroy = u(`${nsvoStr}["${cid}"].destroy(this);`); }, initChild() { Services.ppmm.loadProcessScript(this.processURL, true); Services.mm.loadFrameScript(this.frameURL, true); }, destroyChild() { Services.mm.removeDelayedFrameScript(this.frameURL); Services.mm.loadFrameScript(this.frameURLDestroy, false); Services.ppmm.removeDelayedProcessScript(this.processURL); Services.ppmm.loadProcessScript(this.processURLDestroy, false); }, readSettings() { this.prefVal = Services.prefs.getIntPref(pref, 3); for(var setting of [PREF_ENABLED]) this[setting] = Boolean(this.prefVal & setting); }, saveSettings() { var settings = 0; for(var setting of [PREF_ENABLED]) if (this[setting]) settings += setting; if (this.prefVal != settings) Services.prefs.setIntPref(pref, settings); }, obsAdded: false, setObserver(set) {this.obsAdded = set ? Services.obs.addObserver(this, topic, false) : Services.obs.removeObserver(this, topic); }, observe() { Services.obs.removeObserver(this, topic); this[PREF_ENABLED] = false; this.saveSettings(); } }).init(); } parent.register(this); addDestructor(reason => parent.unregister(this, reason), parent); }) (`(nsvo => (nsvo["%ID%"] = { x: -1, y: -1, d: false, handleEvent(e) {e.button || this[e.type](e);}, mousedown(e) {this.x = e.screenX; this.y = e.screenY, this.down = true;}, mouseup(e) { var {down} = this; this.down = false; if (!down) return; if (e.screenX == this.x && e.screenY == this.y && (e.detail == 1 || e.target.matches( "textarea[disabled],input[disabled],button,select,summary" ))) return; var name = e.originalTarget.nodeName; if (/^(?:(?:xul:)?(?:slider|scrollbarbutton)|resizer)$/.test(name)) return; this.x = this.y = -1; var win = this.getFocusedWin(e.target.ownerGlobal); var sel = win.getSelection(); if (sel.toString()) { (win.docShell || win.document.docShell).doCommand("cmd_copy", null, win); } }, get fm() { delete this.fm; return this.fm = Components.classes["@mozilla.org/focus-manager;1"] .getService(Components.interfaces.nsIFocusManager); }, getFocusedWin(win) { var focusedWin = {}; var elm = this.fm.getFocusedElementForWindow(win.top, true, focusedWin); return focusedWin.value; }, count: 0, init(cfmm) { this.count += 1; cfmm.addEventListener("mousedown", this); cfmm.addEventListener("mouseup", this); if (this.count == 1) this.cpmm.addMessageListener("%ID%:FromParent", this); }, destroy(cfmm) { this.count -= 1; cfmm.removeEventListener("mousedown", this); cfmm.removeEventListener("mouseup", this); if (!this.count) this.cpmm.removeMessageListener("%ID%:FromParent", this); }, }).cpmm = this)(%NSVO%);`)
Это я уже всё что мог лишнее убрал, но иконка кнопки стала мутной, значит что то не то.
Или может скрипт есть?
Отредактировано momo2000 (24-04-2021 10:29:53)
Отсутствует
momo2000
https://forum.mozilla-russia.org/viewto … 93#p785193
Add, или такой вариант
Отредактировано kokoss (24-04-2021 16:36:45)
Win7
Отсутствует
Или может скрипт есть?
Можно попробовать создать JSM'ку
и импортировать её из custom_script.js
var EXPORTED_SYMBOLS = ["AutoCopyChild"]; ChromeUtils.domProcessChild.childID || ChromeUtils.registerWindowActor("AutoCopy", { messageManagerGroups: ["browsers"], allFrames: true, child: {moduleURI: __URI__, events: {DOMDocElementInserted: {}}} }); var re = /\S/; var QueryInterface = ChromeUtils.generateQI(["nsISelectionListener"]); var reasons = ["MOUSEUP", "KEYPRESS", "SELECTALL"] .map(reason => Ci.nsISelectionListener[reason + "_REASON"]); class AutoCopyChild extends JSWindowActorChild { constructor() { super(); this.listener = { QueryInterface, notifySelectionChanged: (d, sel, reason) => reasons.includes(reason) && re.test(sel) && this.docShell.doCommand("cmd_copy") }; } async handleEvent() { await new Promise(ChromeUtils.idleDispatch); (this.sel = this.contentWindow.getSelection()) .addSelectionListener(this.listener); } didDestroy() { this.sel.removeSelectionListener(this.listener); this.sel = this.listener = null; } }
Отредактировано Dumby (25-04-2021 22:12:52)
Отсутствует
Dumby
(async (sel, self) => ({ icon: "circle", colors: [ "mediumseagreen", "silver", "crimson", "blue", "peru", ], initColors() { var colorName = "ucf-gen"; var css = "@-moz-document url(about:preferences#containers)," + " url-prefix(chrome://browser/content/browser.x) {\n"; this.colors.forEach((color, ind) => { var [ic, tc] = color.split(/\s*\|\s*/); css += `\t.identity-color-${colorName}${ind} {\n` + `\t\t--identity-tab-color: ${tc || ic};\n` + `\t\t--identity-icon-color: ${ic};\n\t}\n` }); var url = "data:text/css;charset=utf-8," + encodeURIComponent(css + "}"); var sss = Cc["@mozilla.org/content/style-sheet-service;1"] .getService(Ci.nsIStyleSheetService); sss.loadAndRegisterSheet(Services.io.newURI(url), sss.USER_SHEET); var len = this.colors.length; var pref = "ucf.openInGeneratedContainer.lastColor"; var ind = Math.min(Services.prefs.getIntPref(pref, -1), len - 1); this.nextColor = () => { var next = ind + 1; Services.prefs.setIntPref(pref, ind = next == len ? 0 : next); return colorName + ind; } }, quit: false, init(topic) { Services.obs.addObserver(self = this, topic); Services.obs.addObserver(function quit(s, t) { self.quit = true; Services.obs.removeObserver(self, topic); Services.obs.removeObserver(quit, t); }, "quit-application-granted"); this.initColors(); this.newUsercontext = name => { var id = this.cis.create( name || `[ ${this.cis._lastUserContextId + 1} ]`, this.icon, this.nextColor() ).userContextId; this.saveGens(this.gens.add(id)); return id; } var cpref = "ucf.openInGeneratedContainer.containers"; this.gens = new Set( Services.prefs.getStringPref(cpref, "").split(",").map(Number).filter(Boolean) ); this.saveGens = () => Services.prefs.setStringPref(cpref, Array.from(this.gens).join(",")); }, observe(doc) { var list = doc.querySelectorAll(sel); if (!list.length) return; var menuitem = doc.createXULElement("menuitem"); for(var args of Object.entries({ selectiontype: "single", oncommand: "cmd(window)", nodetype: "folder|query", selection: "folder|query", label: "Открыть всё в контейнере", id: "placesContext_openContainer:tabs:newUsercontext" })) menuitem.setAttribute(...args); menuitem.cmd = this.cmd; menuitem.rnd = menuitem.constructor.prototype.render; menuitem.render = this.render; var [m1, m2] = menuitem.list = Array.from(list); (m2 || m1).after(menuitem); if (doc.documentElement.getAttribute("windowtype") != "navigator:browser") return; for(var btn of [ doc.getElementById("tabs-newtab-button"), doc.getElementById("new-tab-button") || doc.ownerGlobal.gNavToolbox.palette.querySelector("#new-tab-button") ]) if (btn) btn.checkForMiddleClick = this.click; var win = doc.ownerGlobal; this.redefDoSearch(win, win.customElements.get("searchbar").prototype); win.gBrowser.tabContainer.addEventListener("TabClose", this.tabClose); win.addEventListener("unload", this.winUnload, {once: true}); }, winUnload(e) { var win = e.target.ownerGlobal; win.removeEventListener("TabClose", self.tabClose); if (self.quit) return; var gb = win.gBrowser; if (gb) for(var tab of gb.tabs) self.tabClose(null, tab); }, closed: new Set(), cis: ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm") .ContextualIdentityService, tabClose(e, tab = e.target) { var id = +tab.getAttribute("usercontextid"); id && self.gens.has(id) && self.closed.add(id); self.closed.size == 1 && ChromeUtils.idleDispatch(self.meaybeRemove); }, meaybeRemove() { var ids = Array.from(self.closed); self.closed.clear(); for(var id of ids) self.meaybeRemoveById(id); }, meaybeRemoveById(id) { for(var win of CustomizableUI.windows) if (win.document.querySelector(`tab.tabbrowser-tab[usercontextid="${id}"]`)) return; this.saveGens(this.gens.delete(id)); this.cis.remove(id); }, redefDoSearch(win, proto) { var code = `(openTrustedLinkIn => [ {${proto.doSearch}}, openTrustedLinkIn ])( function otl(url, where, params) { if (where != "current") params.userContextId = otl.newUsercontext( document.getElementById("searchbar").value ); openTrustedLinkIn(url, where, params); } );`; (this.redefDoSearch = (win, proto) => { var [obj, func] = win.eval(code); Object.assign(proto, obj); func.newUsercontext = this.newUsercontext; })(win, proto); }, click(btn, e) { if (!(e.button != 2 || e.ctrlKey || e.shiftKey)) { var txt = e.view.readFromClipboard(); if (txt) { var urls = txt.split("\n").map(self.map).filter(Boolean); if (urls.length) return e.preventDefault(), self.openFromClipboard(e.view, urls); } } e.view.checkForMiddleClick(btn, e); }, eo: Object.create(null), map(str) { str = str.trim(); try { var scheme = Services.io.extractScheme(str); var ph = Services.io.getProtocolHandler(scheme); if (ph.scheme == scheme) return Services.io.newURI(str) && {uri: str}; } catch {} }, openFromClipboard(win, urls) { if (win.OpenInTabsUtils.confirmOpenInTabs(urls.length, win)) urls.load = true, this.open(win, this.eo, urls); }, async render() { this.rnd(); await new Promise(this.ownerGlobal.requestAnimationFrame); this.hidden || (this.hidden = this.list.every(self.every)); }, every: node => node.disabled || node.hidden, cmd(win) { var view = this.parentNode._view; var node = win.document.popupNode; node = node._placesView && node._placesView.result.root; self.open(win, node || view.selectedNode || view.result.root); }, open(win, node, list) { var gbw = Cu.import("resource:///modules/PlacesUIUtils.jsm", {}).getBrowserWindow; var w = gbw(win); this.pu = w.PlacesUIUtils; this.fs = w.PlacesUtils.favicons; this.sysp = w.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL; (this.open = (win, node, list) => { this.openURLs(gbw(win), list || win.PlacesUtils.getURLsForContainerNode(node)); node.bookmarkGuid && this.pu.doCommand(win, "placesCmd_delete"); })(win, node, list); }, async openURLs(win, urls) { var userContextId = this.newUsercontext(); var mark = !win.PrivateBrowsingUtils.isWindowPrivate(win); var {load} = urls, gb = win.gBrowser, pos = gb.selectedTab._tPos; for(var {uri, title, isBookmark} of urls) try { if (mark) isBookmark ? this.pu.markPageAsFollowedBookmark(uri) : this.pu.markPageAsTyped(uri); if (load) { gb.addTrustedTab(uri, {index: ++pos, userContextId}); continue; } var state = {userContextId, entries: [{ url: uri, title: title || uri, triggeringPrincipal_base64: this.sysp }]}; var [,, data, mime] = await new Promise( resolve => this.fs.getFaviconDataForPage( Services.io.newURI(uri), (...args) => resolve(args), 16 ) ); if (data.length) state.image = `data:${ mime || "image/x-icon" };base64,${ btoa(String.fromCharCode(...data)) }`; var tab = gb.addTrustedTab(null, {index: ++pos, userContextId}); win.SessionStore.setTabState(tab, state); } catch {}; } }).init("chrome-document-loaded"))( "#placesContext_openBookmarkContainer\\:tabs,#placesContext_openContainer\\:tabs" );
Отредактировано Stkvsky (24-04-2021 18:13:02)
Отсутствует
Если закрыть браузер и запустить заново удаляется
А, наверно имеется ввиду не закрыть браузер как приложение (Выход, Ctrl+Shift+Q),
а когда последнее/единственное браузерное окно закрывается.
Хорошо, попробую.
(async (sel, self) => ({ icon: "circle", colors: [ "mediumseagreen", "silver", "crimson", "blue", "peru", ], initColors() { var colorName = "ucf-gen"; var css = "@-moz-document url(about:preferences#containers)," + " url-prefix(chrome://browser/content/browser.x) {\n"; this.colors.forEach((color, ind) => { var [ic, tc] = color.split(/\s*\|\s*/); css += `\t.identity-color-${colorName}${ind} {\n` + `\t\t--identity-tab-color: ${tc || ic};\n` + `\t\t--identity-icon-color: ${ic};\n\t}\n` }); var url = "data:text/css;charset=utf-8," + encodeURIComponent(css + "}"); var sss = Cc["@mozilla.org/content/style-sheet-service;1"] .getService(Ci.nsIStyleSheetService); sss.loadAndRegisterSheet(Services.io.newURI(url), sss.USER_SHEET); var len = this.colors.length; var pref = "ucf.openInGeneratedContainer.lastColor"; var ind = Math.min(Services.prefs.getIntPref(pref, -1), len - 1); this.nextColor = () => { var next = ind + 1; Services.prefs.setIntPref(pref, ind = next == len ? 0 : next); return colorName + ind; } }, quit: false, init(topic) { Services.obs.addObserver(self = this, topic); var lt = "browser-lastwindow-close-granted"; var lw = () => this.quit = true; Services.obs.addObserver(lw, lt); Services.obs.addObserver(function quit(s, t) { self.quit = true; Services.obs.removeObserver(self, topic); Services.obs.removeObserver(lw, lt); Services.obs.removeObserver(quit, t); }, "quit-application-granted"); this.initColors(); this.newUsercontext = name => { var id = this.cis.create( name || `[ ${this.cis._lastUserContextId + 1} ]`, this.icon, this.nextColor() ).userContextId; this.saveGens(this.gens.add(id)); return id; } var cpref = "ucf.openInGeneratedContainer.containers"; var arr = Services.prefs.getStringPref(cpref, "").split(",").map(Number).filter(Boolean); if (arr.length) { var ids = this.cis.getPublicIdentities().map(i => i.userContextId); arr = arr.filter(id => ids.includes(id)); } this.gens = new Set(arr); (this.saveGens = () => Services.prefs.setStringPref(cpref, Array.from(this.gens).join(",")))(); }, observe(doc) { var list = doc.querySelectorAll(sel); if (!list.length) return; var menuitem = doc.createXULElement("menuitem"); for(var args of Object.entries({ selectiontype: "single", oncommand: "cmd(window)", nodetype: "folder|query", selection: "folder|query", label: "Открыть всё в контейнере", id: "placesContext_openContainer:tabs:newUsercontext" })) menuitem.setAttribute(...args); menuitem.cmd = this.cmd; menuitem.rnd = menuitem.constructor.prototype.render; menuitem.render = this.render; var [m1, m2] = menuitem.list = Array.from(list); (m2 || m1).after(menuitem); if (doc.documentElement.getAttribute("windowtype") != "navigator:browser") return; for(var btn of [ doc.getElementById("tabs-newtab-button"), doc.getElementById("new-tab-button") || doc.ownerGlobal.gNavToolbox.palette.querySelector("#new-tab-button") ]) if (btn) btn.checkForMiddleClick = this.click; var win = doc.ownerGlobal; this.redefDoSearch(win, win.customElements.get("searchbar").prototype); win.gBrowser.tabContainer.addEventListener("TabClose", this.tabClose); win.addEventListener("unload", this.winUnload, {once: true}); this.quit = false; }, winUnload(e) { var win = e.target.ownerGlobal; win.removeEventListener("TabClose", self.tabClose); if (self.quit) return; var gb = win.gBrowser; if (gb) for(var tab of gb.tabs) self.tabClose(null, tab); }, closed: new Set(), cis: ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm") .ContextualIdentityService, tabClose(e, tab = e.target) { var id = +tab.getAttribute("usercontextid"); id && self.gens.has(id) && self.closed.add(id); self.closed.size == 1 && ChromeUtils.idleDispatch(self.meaybeRemove); }, meaybeRemove() { var ids = Array.from(self.closed); self.closed.clear(); for(var id of ids) self.meaybeRemoveById(id); }, meaybeRemoveById(id) { for(var win of CustomizableUI.windows) if (win.document.querySelector(`tab.tabbrowser-tab[usercontextid="${id}"]`)) return; this.saveGens(this.gens.delete(id)); this.cis.remove(id); }, redefDoSearch(win, proto) { var code = `(openTrustedLinkIn => [ {${proto.doSearch}}, openTrustedLinkIn ])( function otl(url, where, params) { if (where != "current") params.userContextId = otl.newUsercontext( document.getElementById("searchbar").value ); openTrustedLinkIn(url, where, params); } );`; (this.redefDoSearch = (win, proto) => { var [obj, func] = win.eval(code); Object.assign(proto, obj); func.newUsercontext = this.newUsercontext; })(win, proto); }, click(btn, e) { if (!(e.button != 2 || e.ctrlKey || e.shiftKey)) { var txt = e.view.readFromClipboard(); if (txt) { var urls = txt.split("\n").map(self.map).filter(Boolean); if (urls.length) return e.preventDefault(), self.openFromClipboard(e.view, urls); } } e.view.checkForMiddleClick(btn, e); }, eo: Object.create(null), map(str) { str = str.trim(); try { var scheme = Services.io.extractScheme(str); var ph = Services.io.getProtocolHandler(scheme); if (ph.scheme == scheme) return Services.io.newURI(str) && {uri: str}; } catch {} }, openFromClipboard(win, urls) { if (win.OpenInTabsUtils.confirmOpenInTabs(urls.length, win)) urls.load = true, this.open(win, this.eo, urls); }, async render() { this.rnd(); await new Promise(this.ownerGlobal.requestAnimationFrame); this.hidden || (this.hidden = this.list.every(self.every)); }, every: node => node.disabled || node.hidden, cmd(win) { var view = this.parentNode._view; var node = win.document.popupNode; node = node._placesView && node._placesView.result.root; self.open(win, node || view.selectedNode || view.result.root); }, open(win, node, list) { var gbw = Cu.import("resource:///modules/PlacesUIUtils.jsm", {}).getBrowserWindow; var w = gbw(win); this.pu = w.PlacesUIUtils; this.fs = w.PlacesUtils.favicons; this.sysp = w.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL; (this.open = (win, node, list) => { this.openURLs(gbw(win), list || win.PlacesUtils.getURLsForContainerNode(node)); node.bookmarkGuid && this.pu.doCommand(win, "placesCmd_delete"); })(win, node, list); }, async openURLs(win, urls) { var userContextId = this.newUsercontext(); var mark = !win.PrivateBrowsingUtils.isWindowPrivate(win); var {load} = urls, gb = win.gBrowser, pos = gb.selectedTab._tPos; for(var {uri, title, isBookmark} of urls) try { if (mark) isBookmark ? this.pu.markPageAsFollowedBookmark(uri) : this.pu.markPageAsTyped(uri); if (load) { gb.addTrustedTab(uri, {index: ++pos, userContextId}); continue; } var state = {userContextId, entries: [{ url: uri, title: title || uri, triggeringPrincipal_base64: this.sysp }]}; var [,, data, mime] = await new Promise( resolve => this.fs.getFaviconDataForPage( Services.io.newURI(uri), (...args) => resolve(args), 16 ) ); if (data.length) state.image = `data:${ mime || "image/x-icon" };base64,${ btoa(String.fromCharCode(...data)) }`; var tab = gb.addTrustedTab(null, {index: ++pos, userContextId}); win.SessionStore.setTabState(tab, state); } catch {}; } }).init("chrome-document-loaded"))( "#placesContext_openBookmarkContainer\\:tabs,#placesContext_openContainer\\:tabs" );
Отсутствует
Посоветуйте, каким расширением или user-скриптом сохранять такие картинки или убрать перекрывающий элемент страницы?
Image Picka и Text Linky Tool, извлекают изображения со страницы.
Для перекрывающих элементов пользуюсь Remove HTML Elements.
Отсутствует
kazarin - спасибо!
Подскажите, как найти ID пункта контекстного меню через DOM Inspector?
расширение SingleFile создаёт в контекстном меню строку: «Сохранить выделенное», нужен ID этой строки.
Три решения. 1) Инструкция от Viatcheslav
2) Инструменты браузера > Отключить автоскрытие всплывающих окон.
3) Кнопка Extensions Developer Tools > Инспектор атрибутов, открываем контекстное меню браузера. При этом отображается подсказка о выбранном пункте меню.
Отредактировано Dobrov (01-05-2021 04:44:43)
Отсутствует
Dobrov
https://forum.mozilla-russia.org/viewto … 83#p788883
или
Кнопка ucf для Attributes_Inspector от Dumby
https://forum.mozilla-russia.org/viewto … 07#p789007
Путь к attrsInspector.js прописать свой.
Сам attrsInspector.js
https://github.com/Infocatcher/Custom_B … _Inspector
Комбинации клавиш прописаны в начале attrsInspector.js
Отредактировано _zt (29-04-2021 17:39:12)
Отсутствует
Dumby, здравствуйте.
Посмотрите пожалуйста кнопку "Включить / отключить куки".
Можно ли ее починить?
Иконка " включить" не запоминает состояние переключения, если куки разрешены,
и после перезагрузки браузера, иконка показывает, что куки выключены.
var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); var prefDomain = "network.cookie.cookieBehavior"; function pref() { var p = prefService.getIntPref(prefDomain); return p; } this.toggleCookieBehavior = function() { if(pref() == 2) { prefService.setIntPref(prefDomain, 4); this.image = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIj48cGF0aCBkPSJNMTI5OSA4MTNsLTQyMiA0MjJxLTE5IDE5LTQ1IDE5dC00NS0xOWwtMjk0LTI5NHEtMTktMTktMT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nMjIiB4bWxuczpyZGZzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzAxL3JkZi1zY2hlbWEjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgoJCQk8cmRmOkRlc2NyaXB0aW9uIGFib3V0PSJodHRwczovL2ljb25zY291dC5jb20vbGVnYWwjbGljZW5zZXMiIGRjOnRpdGxlPSJEb3QsIENpcmNsZSwgUm91bmQsIEJsYWNrLCBIb2xlIiBkYzpkZXNjcmlwdGlvbj0iRG90LCBDaXJjbGUsIFJvdW5kLCBCbGFjaywgSG9sZSIgZGM6cHVibGlzaGVyPSJJY29uc2NvdXQiIGRjOmRhdGU9IjIwMTYtMTItMTQiIGRjOmZvcm1hdD0iaW1hZ2Uvc3ZnK3htbCIgZGM6bGFuZ3VhZ2U9ImVuIj4KCQkJCTxkYzpjcmVhdG9yPgoJCQkJCTxyZGY6QmFnPgoJCQkJCQk8cmRmOmxpPkZvbnQgQXdlc29tZTwvcmRmOmxpPgoJCQkJCTwvcmRmOkJhZz4KCQkJCTwvZGM6Y3JlYXRvcj4KCQkJPC9yZGY6RGVzY3JpcHRpb24+CgkJPC9yZGY6UkRGPgogICAgPC9tZXRhZGF0YT48L3N2Zz4K"; } }
Отсутствует
Можно ли ее починить?
Нет. Нельзя починить то, что не было сломано.
(pref => { var {BEHAVIOR_REJECT, BEHAVIOR_REJECT_TRACKER} = Ci.nsICookieService; var icons = { [BEHAVIOR_REJECT]: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIj48cGF0aCBkPSJNMTE1MiA4OTZxMCAxMDYtNzUgMTgxdC0xOD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1hIyIgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIj4KCQkJPHJkZjpEZXNjcmlwdGlvbiBhYm91dD0iaHR0cHM6Ly9pY29uc2NvdXQuY29tL2xlZ2FsI2xpY2Vuc2VzIiBkYzp0aXRsZT0iQ2hlY2ssIFJpZ2h0LCBBY2NwZXQsIFZlcmlmeSwgUGVyZmVjdCwgQXBwcm92ZSwgQnV0dG9uLCBDaXJjbGUiIGRjOmRlc2NyaXB0aW9uPSJDaGVjaywgUmlnaHQsIEFjY3BldCwgVmVyaWZ5LCBQZXJmZWN0LCBBcHByb3ZlLCBCdXR0b24sIENpcmNsZSIgZGM6cHVibGlzaGVyPSJJY29uc2NvdXQiIGRjOmRhdGU9IjIwMTYtMTItMTQiIGRjOmZvcm1hdD0iaW1hZ2Uvc3ZnK3htbCIgZGM6bGFuZ3VhZ2U9ImVuIj4KCQkJCTxkYzpjcmVhdG9yPgoJCQkJCTxyZGY6QmFnPgoJCQkJCQk8cmRmOmxpPkZvbnQgQXdlc29tZTwvcmRmOmxpPgoJCQkJCTwvcmRmOkJhZz4KCQkJCTwvZGM6Y3JlYXRvcj4KCQkJPC9yZGY6RGVzY3JpcHRpb24+CgkJPC9yZGY6UkRGPgogICAgPC9tZXRhZGF0YT48L3N2Zz4K" }; var setIcon = () => this.icon.src = icons[Services.prefs.getIntPref(pref)] || "chrome://browser/content/robot.ico"; setIcon(); Services.prefs.addObserver(pref, setIcon); addDestructor(() => Services.prefs.removeObserver(pref, setIcon)); this.toggleCookieBehavior = () => Services.prefs.setIntPref( pref, Services.prefs.getIntPref(pref) == BEHAVIOR_REJECT ? BEHAVIOR_REJECT_TRACKER : BEHAVIOR_REJECT ); })("network.cookie.cookieBehavior");
Отсутствует
Dumby,
Нельзя починить то, что не было сломано.
Да, да, сморозил.
Кнопка исправно работает. Большое вам спасибо.
Оставлю здесь, если кому-то нужно.
Кнопка отреставрированная Dumby.
"Включить / отключить куки"
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%u0412%u043A%u043B%u044E%u0447%u0438%u0442%u044C%20/%20%u043E%u0442%u043A%u043B%u044E%u0447%u0438%u0442%u044C%20%u043A%u0443%u043A%u0438%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArxJREFUeNqkU0tPE1EYPTNMIYUG+rIM71cRCNGKSCEtGNSgqZoQgi40caExrv0pLowxsjCi7jQmLiAmhiAtCgSNiSGEWN5SW4RSKM7QduaO906nqCsX3vTMTL57zun57nzDaZqG/1kCu4zcECDkcRB4gP7sHIcuWm6icBq8LYoF+l9TBIgr9KKo2m+DP5Y3z1x8RTzW43U0nmoqsNgcrJja39ne/jq7EP0SnCHy3gtamvkrgbG6TMWu2y2BO/2W0kpnvtkMXhAQCk3C19UpFjrKRFtdW+v86CO7ktikQTHFROwBNIwD+UXX3Odu9lvEKmd0axtpWYa0swNv+0n9mdXYHuMwLtMQzTBQVPQ63B1es93ljERjePr4GZbDS1AzGaSSSQQnQnqN7TEO4zKNSgyDNMGJkopmN4vtspZg4HIAZaVHoCqKjo42jw62xziMyzTpnEFG1ar4giIrx/NIHxygtqH2UByamNbv3ad9+l5w/APMVqeVaSiMBAryTSYTNzY6rpOl3d2s+N00gmPTWFlaP6z5e7wgqsoxDYVhoGJLSiaSvu52EEKwsriuk72dHgxeDaC8PNsOM5P395GIRZJMQ2G0QLTPy3OfYsl4HGvLG3g+9Aor4axJfWNNth1VxZnzfsh7e9hYmo8xjWlBA8dG+V6AF00F5qGeS9d7ba4yy7e1GCqrS5Eb88WHI5AWo+x1Q0mniRSPJ3mJrGoEU/og0fcZlWX5QejNS7vvwqCnrqG6KEUPLPR2Ft19HYiGv2PA35cbOJa6hOL4k+HhjJ6Ao8Nfb+Nwtk672Cya79a3eI7WuFscLrGikBpj8v5rJRaOIC3JKZIiMWSwa4zxx5wBS8Lm3um2Q/RVwV9jRauJR3n2jBBZTWDu/Tomw3Fs0tKPavqB3aId5QxYrEIDwj++YHr2+Ekhse5/CTAAXnxi0o4gTYMAAAAASUVORK5CYII%3D%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B%28pref%20%3D%3E%20%7B%0A%09var%20%7BBEHAVIOR_REJECT%2C%20BEHAVIOR_REJECT_TRACKER%7D%20%3D%20Ci.nsICookieService%3B%0A%09var%20icons%20%3D%20%7B%0A%09%09%5BBEHAVIOR_REJECT%5D%3A%20%22data%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArxJREFUeNqkU0tPE1EYPTNMIYUG+rIM71cRCNGKSCEtGNSgqZoQgi40caExrv0pLowxsjCi7jQmLiAmhiAtCgSNiSGEWN5SW4RSKM7QduaO906nqCsX3vTMTL57zun57nzDaZqG/1kCu4zcECDkcRB4gP7sHIcuWm6icBq8LYoF+l9TBIgr9KKo2m+DP5Y3z1x8RTzW43U0nmoqsNgcrJja39ne/jq7EP0SnCHy3gtamvkrgbG6TMWu2y2BO/2W0kpnvtkMXhAQCk3C19UpFjrKRFtdW+v86CO7ktikQTHFROwBNIwD+UXX3Odu9lvEKmd0axtpWYa0swNv+0n9mdXYHuMwLtMQzTBQVPQ63B1es93ljERjePr4GZbDS1AzGaSSSQQnQnqN7TEO4zKNSgyDNMGJkopmN4vtspZg4HIAZaVHoCqKjo42jw62xziMyzTpnEFG1ar4giIrx/NIHxygtqH2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Kzi21UdlGTTbaL7TAbDoAgedlq6mulI3GKIZiKYfbTRAXJIsiLUPDKBTgdnZQUFSwR3aPjMnvhuNOOeYaege1xqChHGJJBTxSVSoVM9g/JIMjwWCCPDwG1+AYlhdX93z1jQ6IgsBQDrFEFzgB/khoO+RssGvoKSsLq7Dkm+GorYSZNSInJ1HOHe4NPMENFIVV8TOCPBvJEkRpcmnmoy+0uYmvS9/Q++glludXZZK1OD9RjiDAE/OhpvksPsV9MudVyb6EgriAvoXZyfYca3kuazJnXu5oRd5BE5WKCOnC3cgwpoUN0m8JQSGIcDgS627X3iIV1MoKSD+90Wj0gfv1C09g/Xu4sChPJrsGxkHvylTYC/2pcuhPV8DP+1FxqTm78XzTEcREO0MBDBl+q5bBiULpXCmr7raWVR7Kt5XpjWxuOkmM2+sD/OSODxEuGjN2VO2ffvZ5Qp5dBhO7CWgpdO4NNh1YpwX1+RpUqBTISfwjrK1sY6a3NeOq6UZB8dqTFQ96duzoSud3E9BS0pOm/Ofd7Uq9R+q1Q8W8x32uk1b/S4ABAB8mYiP34I0MAAAAAElFTkSuQmCC%22%0A%09%7D%3B%0A%09var%20setIcon%20%3D%20%28%29%20%3D%3E%20this.icon.src%20%3D%0A%09%09icons%5BServices.prefs.getIntPref%28pref%29%5D%20%7C%7C%20%22chrome%3A//browser/content/robot.ico%22%3B%0A%09setIcon%28%29%3B%0A%09Services.prefs.addObserver%28pref%2C%20setIcon%29%3B%0A%09addDestructor%28%28%29%20%3D%3E%20Services.prefs.removeObserver%28pref%2C%20setIcon%29%29%3B%0A%0A%09this.toggleCookieBehavior%20%3D%20%28%29%20%3D%3E%20Services.prefs.setIntPref%28%0A%09%09pref%2C%20Services.prefs.getIntPref%28pref%29%20%3D%3D%20BEHAVIOR_REJECT%0A%09%09%09%3F%20BEHAVIOR_REJECT_TRACKER%20%3A%20BEHAVIOR_REJECT%0A%09%29%3B%0A%7D%29%28%22network.cookie.cookieBehavior%22%29%3B%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5Bthis.toggleCookieBehavior%28%29%3B%0ABrowserReload%28%29%3B%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
Отсутствует
Уважаемые, подскажите, есть ли кнопка или скрипт, в который можно прописать адрес chrome://browser/content/places/places.xhtml?
И ещё вопрос такой, можно ли в одну кнопку прописать несколько папок, чтоб не делать отдельные на каждую?
Отсутствует
kazarin
this.onclick = function(event) { if(event.button == 0) { gBrowser. selectedTab = gBrowser. addTrustedTab ("chrome://browser/content/places/places.xhtml") } else if(event.button == 1) { document.getElementById('menu_openDownloads').click() } };
Отсутствует