Beiträge von Mira_Belle
-
-
Phü, nach langem ausprobieren doch geschafft.
JavaScript
Alles anzeigen// ==UserScript== // @name UserCSSLoader (bereinigt) // @description CSS-Codes - Styles laden und verwalten (bereinigte Version) // @namespace http://d.hatena.ne.jp/Griever/ // @author Griever (bereinigt von Andreas Schepers) // @include main // @license MIT License // @charset UTF-8 // @version 0.1.0 // @note Bereinigtes Skript: Nur Hauptmenü "CSS", keine Untermenüs, keine UC-CSS-Unterstützung // ==/UserScript== /* Bedienungsanleitung: CSS-Dateien im Chrome-Ordner im Unterordner "CSS" ablegen. Linksklick auf Stil: Aktivieren/Deaktivieren Mittelklick auf Stil: Aktivieren/Deaktivieren (Menü bleibt offen) Rechtsklick auf Stil: Im Editor öffnen Strg+Rechtsklick: Im Dateimanager anzeigen */ (function(){ /***** Konfiguration *****/ // Position: als frei verschiebbare-Schaltfläche = 0, als Menü anzeigen = 1 let position = 1; // Unterordner für CSS-Dateien let cssFolder = "CSS"; /***** Ende Konfiguration *****/ ChromeUtils.importESModule("resource://gre/modules/AppConstants.sys.mjs"); if (window.UCL) { window.UCL.destroy(); delete window.UCL; } window.UCL = { USER_SHEET: Ci.nsIStyleSheetService.USER_SHEET, AGENT_SHEET: Ci.nsIStyleSheetService.AGENT_SHEET, AUTHOR_SHEET: Ci.nsIStyleSheetService.AUTHOR_SHEET, readCSS: {}, get disabled_list() { let obj = []; try { obj = decodeURIComponent(this.prefs.getCharPref("disabled_list")).split("|"); } catch(e) {} delete this.disabled_list; return this.disabled_list = obj; }, get prefs() { delete this.prefs; return this.prefs = Services.prefs.getBranch("UserCSSLoader."); }, get styleSheetServices() { delete this.styleSheetServices; return this.styleSheetServices = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); }, get FOLDER() { let aFolder; try { let folderPath = this.prefs.getCharPref("FOLDER"); aFolder = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); aFolder.initWithPath(folderPath); } catch (e) { aFolder = Services.dirsvc.get("UChrm", Ci.nsIFile); aFolder.appendRelativePath(cssFolder); } if (!aFolder.exists() || !aFolder.isDirectory()) { aFolder.create(Ci.nsIFile.DIRECTORY_TYPE, 0o664); } delete this.FOLDER; return this.FOLDER = aFolder; }, init: function() { const cssmenu = $C("menu", { id: "usercssloader-menu", label: "CSS", tooltiptext: "CSS-Styles verwalten\nLinksklick: Aktivieren/Deaktivieren\nMittelklick: Aktivieren/Deaktivieren (Menü bleibt offen)\nRechtsklick: Bearbeiten\nStrg+Rechtsklick: Im Dateimanager öffnen", accesskey: "Y" }); cssmenu.addEventListener("click", (event) => { if (event.button === 1) UCL.rebuild(); }); const menupopup = $C("menupopup", { id: "usercssloader-menupopup" }); cssmenu.appendChild(menupopup); // Schaltfläche in Navigationsleiste einfügen CustomizableUI.createWidget({ id: 'usercssloader-menu-item', type: 'custom', defaultArea: CustomizableUI.AREA_NAVBAR, onBuild: function(aDocument) { let toolbaritem = aDocument.createXULElement('toolbaritem'); toolbaritem.id = 'usercssloader-menu-item'; toolbaritem.className = 'chromeclass-toolbar-additional'; return toolbaritem; } }); $('usercssloader-menu-item').appendChild(cssmenu); if (position === 1) { let refNode = $('helpMenu'); refNode.parentNode.insertBefore(cssmenu, refNode.nextSibling); } this.rebuild(); this.initialized = true; window.addEventListener("unload", this, false); }, uninit: function() { const dis = []; for (let x of Object.keys(this.readCSS)) { if (!this.readCSS[x].enabled) dis.push(x); } this.prefs.setCharPref("disabled_list", encodeURIComponent(dis.join("|"))); window.removeEventListener("unload", this, false); }, rebuild: function() { let ext = /\.css$/i; let files = this.FOLDER.directoryEntries.QueryInterface(Ci.nsISimpleEnumerator); while (files.hasMoreElements()) { let file = files.getNext().QueryInterface(Ci.nsIFile); if (!ext.test(file.leafName)) continue; let CSS = this.loadCSS(file); CSS.flag = true; } for (let leafName of Object.keys(this.readCSS)) { const CSS = this.readCSS[leafName]; if (!CSS.flag) { CSS.enabled = false; delete this.readCSS[leafName]; } else { delete CSS.flag; this.rebuildMenu(leafName); } } }, loadCSS: function(aFile) { let CSS = this.readCSS[aFile.leafName]; if (!CSS) { CSS = this.readCSS[aFile.leafName] = new CSSEntry(aFile); if (this.disabled_list.indexOf(CSS.leafName) === -1) { CSS.enabled = true; } } else if (CSS.enabled) { CSS.enabled = true; } return CSS; }, rebuildMenu: function(aLeafName) { let CSS = this.readCSS[aLeafName]; let menuitem = document.getElementById("usercssloader-" + aLeafName); if (!CSS) { if (menuitem) menuitem.parentNode.removeChild(menuitem); return; } if (!menuitem) { menuitem = $C("menuitem", { label: aLeafName, id: "usercssloader-" + aLeafName, class: "usercssloader-item " + (CSS.SHEET == this.AGENT_SHEET ? "AGENT_SHEET" : CSS.SHEET == this.AUTHOR_SHEET ? "AUTHOR_SHEET" : "USER_SHEET"), type: "checkbox", autocheck: "false", tooltiptext: "Linksklick: an/aus, Menü schließt\nMittelklick: an/aus, Menü bleibt offen\nRechtsklick: bearbeiten\nStrg+Rechtsklick: im Dateimanager anzeigen" }); menuitem.addEventListener("command", () => UCL.toggle(aLeafName)); menuitem.addEventListener("click", (event) => UCL.itemClick(event)); menuitem.addEventListener("mouseup", (event) => { if (event.button === 1) event.preventDefault(); }); document.getElementById("usercssloader-menupopup").appendChild(menuitem); } menuitem.setAttribute("checked", CSS.enabled); }, toggle: function(aLeafName) { let CSS = this.readCSS[aLeafName]; if (!CSS || event.ctrlKey) return; CSS.enabled = !CSS.enabled; this.rebuildMenu(aLeafName); }, itemClick: function(event) { let label = event.currentTarget.getAttribute("label"); event.preventDefault(); event.stopPropagation(); if (event.button === 0) { return; } else if (event.button === 1) { this.toggle(label); } else if (event.button === 2) { if (event.ctrlKey) { UCL.openFolder(label); } else { closeMenus(event.target); this.edit(this.getFileFromLeafName(label)); } } }, getFileFromLeafName: function(aLeafName) { let f = this.FOLDER.clone(); f.QueryInterface(Ci.nsIFile); f.appendRelativePath(aLeafName); return f; }, }; function CSSEntry(aFile) { this.path = aFile.path; this.leafName = aFile.leafName; this.lastModifiedTime = 1; this.SHEET = /^xul-|\.as\.css$/i.test(this.leafName) ? Ci.nsIStyleSheetService.AGENT_SHEET : /\.author\.css$/i.test(this.leafName) ? Ci.nsIStyleSheetService.AUTHOR_SHEET : Ci.nsIStyleSheetService.USER_SHEET; } CSSEntry.prototype = { sss: Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService), _enabled: false, get enabled() { return this._enabled; }, set enabled(isEnable) { let aFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); aFile.initWithPath(this.path); let isExists = aFile.exists(); let lastModifiedTime = isExists ? aFile.lastModifiedTime : 0; let isForced = this.lastModifiedTime != lastModifiedTime; let fileURL = Services.io.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler).getURLSpecFromActualFile(aFile); let uri = Services.io.newURI(fileURL, null, null); if (this.sss.sheetRegistered(uri, this.SHEET)) { if (!isEnable || !isExists) { this.sss.unregisterSheet(uri, this.SHEET); } else if (isForced) { this.sss.unregisterSheet(uri, this.SHEET); this.sss.loadAndRegisterSheet(uri, this.SHEET); } } else { if (isEnable && isExists) { this.sss.loadAndRegisterSheet(uri, this.SHEET); } } if (this.lastModifiedTime !== 1 && isEnable && isForced) { console.log(this.leafName + " wurde aktualisiert"); } this.lastModifiedTime = lastModifiedTime; return this._enabled = isEnable; }, }; UCL.init(); function $(id) { return document.getElementById(id); } function $C(name, attr) { const el = document.createXULElement(name); if (attr) Object.keys(attr).forEach(function(n) { el.setAttribute(n, attr[n]) }); return el; } })();Jetzt muss ich nur noch sehen, wie ich das Skript, bzw, die Funktionen in das App-Menü bekomme.
-
Das Skript macht mir zu schaffen!
Bekomme es einfach nicht hin, dass das Untermenü verschwindet
Nein, nicht einfach ausblenden, sondern dass auch die Funktionen (Code) aus dem Skript entfernt wird.Bräuchte nur das "Ein- und Ausschalten der CSS-Dateien, sonst nichts.
-
-
Kann es sein, dass die zweite Trennlinie nur auftaucht, weil Ihr das zusammen gewürfelte Skript nutzt?
Denn ich nutze ja die getrennten Skripte
JavaScript
Alles anzeigen// ==UserScript== // @name OpenWith (Link-Only-Version) // @description Fügt dem Kontextmenü ein Menü hinzu, um einen ausgewählten Link in einem anderen Browser zu öffnen. // @version 1.2.2-mod // @author y2k, angepasst von User // @include main // @charset UTF-8 // @namespace http://tabunfirefox.web.fc2.com/ // @note Anwendungssymbol anzeigen // @note als .uc.js Script umgeschrieben // ==/UserScript== (function() { "use strict"; if (location != 'chrome://browser/content/browser.xhtml') return; /* Vor Verwendung, Pfad auf eigene Umgebung ändern(\ wird durch \\ ersetzt) Zum Übergeben von Argumenten, wie folgt vorgehen: C:\\Program Files\\Internet Explorer\\iexplore.exe<>$1 Argument Argument ※ $1 wird in URL umgewandelt */ const BrowserPath = { "Nightly": "C:\\Program Files\\Firefox Nightly\\firefox.exe", "Firefox": "C:\\Program Files\\Mozilla Firefox\\firefox.exe", "Vivaldi": "C:\\Users\\Andreas\\AppData\\Local\\Vivaldi\\Application\\vivaldi.exe", "Edge": "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe", "IE": "C:\\Program Files\\Internet Explorer\\iexplore.exe", "Neues Fenster": "C:\\Program Files\\Mozilla Firefox\\firefox.exe<>-new-window $1 -foreground", "Neu": "C:\\Program Files\\Mozilla Firefox\\firefox.exe<>$1 -P Neu -foreground", }; const FlatMenu = false; const OpenWith = { start: function() { const cm = document.getElementById("contentAreaContextMenu"); cm.addEventListener("popupshowing", function(e) { if (e.target == this) { OpenWith.onpopup(e); } }, false); }, createMenu: function() { // Nur einmal ausführen if (this.linkItem) { return; } const contextMenu = document.getElementById("contentAreaContextMenu"); // Nur noch das Link-Menü erstellen const linkMenu = this.$C("menu", { id: "context-open-with-link", label: "Link öffnen mit ..." }); contextMenu.insertBefore(linkMenu, contextMenu.querySelector(":scope > #context-sep-open")); // Nur noch die Menüeinträge für den Link erstellen this.linkItem = this.createMenuItem(linkMenu, "openLink", FlatMenu? "Link öffnen mit $1 ":" $1"); }, createMenuItem: function(menu, method, format) { const frag = document.createDocumentFragment(); let menuitem = []; for (let i of Object.keys(BrowserPath)) { const item = this.$C("menuitem", { label: format.replace("$1", i), class: "menuitem-iconic", image: "moz-icon:file:///" + encodeURIComponent(BrowserPath[i].split("<>")[0]) + "?size=16", value: JSON.stringify([ method, i ]), }); item.addEventListener("command", this, false); frag.appendChild(item); menuitem[menuitem.length] = item; } if (!FlatMenu) { const menupopup = this.$C("menupopup"); menupopup.appendChild(frag); menu.appendChild(menupopup); menuitem = [ menu ]; } else { const parent = menu.parentNode; parent.insertBefore(frag, menu); parent.removeChild(menu); } return menuitem; }, $C: function(tag, attrs) { const elem = document.createXULElement(tag); if (attrs) { for (let key of Object.keys(attrs)) elem.setAttribute(key, attrs[key]); } return elem; }, onpopup: function(e) { this.createMenu(); // Logik für das Seiten-Menü wurde entfernt. // Das Link-Menü wird nur angezeigt, wenn man auf einem Link ist. const isHtml = /^(https?|file):/.test(gBrowser.currentURI.spec); const linkItemHidden = !isHtml || !gContextMenu.onLink || gContextMenu.onTextInput; const linkItem = this.linkItem; for (let i = 0, l = linkItem.length; i < l; i++) { linkItem[i].hidden = linkItemHidden; } }, handleEvent: function(event) { if (event.type === "command") { // Da es nur noch "openLink" gibt, kann die Logik vereinfacht werden. const [ method, key ] = JSON.parse(event.originalTarget.getAttribute("value")); const url = gContextMenu.linkURL; // Es wird immer die Link-URL sein this.launch(BrowserPath[key], url); } }, launch: function(browserPath, openURL) { let [ path, args ] = browserPath.split("<>"); if (args) { args = args.split(" ").map(a => a.replace("$1", openURL)); } else { args = [ openURL ]; } const file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); file.initWithPath(path); const process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess); process.init(file); process.run(false, args, args.length, {}); }, }; OpenWith.start(); })();Code
Alles anzeigen// ==UserScript== // @name OpenWith // @description Fügt dem Kontextmenü ein Menü hinzu, zum Öffnen der aktuellen Seite in einem anderen Browser. // @version 1.2.1a 63+ // @author y2k // @include main // @charset UTF-8 // @namespace http://tabunfirefox.web.fc2.com/ // @note Anwendungssymbol anzeigen // @note als .uc.js Script umgeschrieben // ==/UserScript== (function() { "use strict"; if (location != 'chrome://browser/content/browser.xhtml') return; /* Vor Verwendung, Pfad auf eigene Umgebung ändern(\ wird durch \\ ersetzt) Zum Übergeben von Argumenten, wie folgt vorgehen: C:\\Program Files\\Internet Explorer\\iexplore.exe<>$1 Argument Argument ※ $1 wird in URL umgewandelt */ const BrowserPath = { "Nightly": "C:\\Program Files\\Firefox Nightly\\firefox.exe", "Firefox": "C:\\Program Files\\Mozilla Firefox\\firefox.exe", "Vivaldi": "C:\\Users\\Andreas\\AppData\\Local\\Vivaldi\\Application\\vivaldi.exe", "Edge": "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe", "IE": "C:\\Program Files\\Internet Explorer\\iexplore.exe", "Neues Fenster": "C:\\Program Files\\Mozilla Firefox\\firefox.exe<>-new-window $1 -foreground", "Neu": "C:\\Program Files\\Mozilla Firefox\\firefox.exe<>$1 -P Neu -foreground", }; const FlatMenu = false; const OpenWith = { start: function() { const cm = document.getElementById("contentAreaContextMenu"); cm.addEventListener("popupshowing", function(e) { if (e.target == this) { OpenWith.onpopup(e); } }, false); }, createMenu: function() { if (this.pageItem) { return; } const contextMenu = document.getElementById("contentAreaContextMenu"); const pageMenu = this.$C("menu", { id: "context-open-with-page", label: "Seite öffnen mit ..." }); // contextMenu.insertBefore(pageMenu, contextMenu.querySelector(":scope > #context-bookmarkpage, :scope > #context-savepage")); contextMenu.insertBefore(pageMenu, contextMenu.querySelector(":scope > #context-sep-selectall")); this.pageItem = this.createMenuItem(pageMenu, "openPage", FlatMenu ? "Seite öffnen mit $1 " : " $1"); }, createMenuItem: function(menu, method, format) { const frag = document.createDocumentFragment(); let menuitem = []; for (let i of Object.keys(BrowserPath)) { const item = this.$C("menuitem", { label: format.replace("$1", i), class: "menuitem-iconic", image: "moz-icon:file:///" + encodeURIComponent(BrowserPath[i].split("<>")[0]) + "?size=16", value: JSON.stringify([method, i]), }); item.addEventListener("command", this, false); frag.appendChild(item); menuitem[menuitem.length] = item; } if (!FlatMenu) { const menupopup = this.$C("menupopup"); menupopup.appendChild(frag); menu.appendChild(menupopup); menuitem = [menu]; } else { const parent = menu.parentNode; parent.insertBefore(frag, menu); parent.removeChild(menu); } return menuitem; }, $C: function(tag, attrs) { const elem = document.createXULElement(tag); if (attrs) { for (let key of Object.keys(attrs)) elem.setAttribute(key, attrs[key]); } return elem; }, onpopup: function(e) { this.createMenu(); const isHtml = /^(https?|file):/.test(gBrowser.currentURI.spec); const pageItemHidden = !isHtml || gContextMenu.onLink || gContextMenu.onTextInput; const pageItem = this.pageItem; for (let i = 0, l = pageItem.length; i < l; i++) { pageItem[i].hidden = pageItemHidden; } }, handleEvent: function(event) { if (event.type === "command") { const [method, key] = JSON.parse(event.originalTarget.getAttribute("value")); const url = gBrowser.currentURI.spec; this.launch(BrowserPath[key], url); } }, launch: function(browserPath, openURL) { let [path, args] = browserPath.split("<>"); if (args) { args = args.split(" ").map(a => a.replace("$1", openURL)); // Split bei Leerzeichen } else { args = [openURL]; } console.log("Call: " + args); const file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); file.initWithPath(path); const process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess); process.init(file); process.run(false, args, args.length, {}); }, }; OpenWith.start(); })();Dann müsste man mal schauen, in welchem Teil, bei den zusammengeführten Skript die Trennlinie erzeugt wird.
Bitte testet das noch mal mit den zwei separaten Skripten. -
Und unter welchen Umständen stimmt was mit dem Hintergrund und den Slidern nicht?
Endor Welche Konfiguration, und kurze Fehlerbeschreibung bitte.
Würde das gerne heute Nachmittag oder Abend mal nachstellen wollen. -
-
lenny2 Was meinst Du mit Trennzeichen?
Den Doppelpunkt? Kann man ändern.
Z.B. so => const linkMenu = this.$C("menu", { id: "context-open-with-link", label: "Link öffnen mit ..." });
oder so => const pageMenu = this.$C("menu", { id: "context-open-with-page", label: "Seite öffnen mit ..." });Den Pfeil, der ist doch i.O.
-
-
Endor Du "sprichst" jetzt vom Original, oder?
Und unter welchen Umständen stimmt was mit dem Hintergrund und den Slidern nicht?
Denn ich kann nichts feststellen. -
-
Alles anzeigen
...
Nachdem ich das alles angepasst hatte, und deine beiden Skripte wieder in einer Datei habe, meine Pfade eingetragen...etc. sieht das jetzt so aus:
Bzw. so:
und alles funktioniert wie gewünscht

Mira, dir nochmals ganz herzlichen Dank für deine Zeit und Ausdauer

...
Ein kleiner Nachtrag!
Mir passte es nicht, dass die Menüeinträge einmal an verschiedenen Stellen erschienen
und dann auch noch, an für mich, unpassenden!
Wer möchte, kann einmal für das ""Link öffnen mit:"-Menü diesen Code verwenden,
damit es direkt über dem Separator erscheint
contextMenu.insertBefore(linkMenu, contextMenu.querySelector(":scope > #context-sep-open"));und für das "Seite öffnen mit:"-Menü diesen, damit auch dieses Menü direkt über dem Separator ist.
contextMenu.insertBefore(pageMenu, contextMenu.querySelector(":scope > #context-sep-selectall"));Wer die Menüs an ganz anderer Stelle haben möchte, sucht sich den Selektor, der hinter dem Menü sein soll!
-
-
Das Skript zum Anpassen der Scrollbar funktioniert leider nur noch teilweise!
Die Pfeile werden nicht mehr angezeigt!!
Es ist egal, ob das Original von Aris benutzt wird,
oder dieses =>JavaScript
Alles anzeigen// Scrollbar.uc.js "use strict"; /* Firefox userChrome.js tweaks - 'Custom Scrollbars' for Firefox ************************************************************ */ /* Original by Aris (aris-addons@gmx.net)************************************************************************************* */ /* Github: https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/custom_scrollbars.uc.js /* *************************************************************************************************************************** */ /* Customized by Mira********************************************************************************************************* */ /* https://www.camp-firefox.de/forum/thema/135133-custom-scrollbars-uc-js-anpassen/ ****************************************** */ /* Scrollbar.v1.0.6.js https://www.camp-firefox.de/forum/thema/135133/?postID=1207718#post1207718************************** */ /* https://www.camp-firefox.de/forum/thema/136152/?postID=1222989#post1222989************************************************* */ /* Scrollbar.v2.0.2.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223096#post1223096************************** */ /* Scrollbar.v2.0.3.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223124#post1223124************************** */ /* Scrollbar.v2.0.5.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223143#post1223143************************** */ /* Scrollbar.v2.0.6.1.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223162#post1223162************************** */ /* *************************************************************************************************************************** */ /* Custom Scrollbars for Firefox ********************************************************************************************* */ /* Version: 2.0.6.1 for Firefox 111+ ***************************************************************************************** */ /* ****************************************************************************************************************************** README about:config > widget.windows.overlay-scrollbars.enabled > false (Windows) widget.gtk.overlay-scrollbars.enabled > false (Linux) [!] The above preferences have to be set to 'false' for this code to work [!] DER STARTUP-CACHE MUSS NACH JEDER ÄNDERUNG GELÖSCHT WERDEN! -> Ordner 'startupCache' finden: Adressleiste > about:profiles > Lokales Verzeichnis > Ordner öffnen > startupCache -> Firefox schließen -> Inhalt des 'startupCache'-Ordners löschen Alternativ mit einem JavaScipt! -> https://github.com/Endor8/userChrome.js/blob/master/Firefox%2087/RestartFirefoxButtonM.uc.js Anpassungen vornehmen > Werte ändern - Optionen aktivieren/deaktivieren: true <-> false - Farbe - Name: red, blue, transparent - Hexcode: #33CCFF, #FFF - rgb(a): rgba(0,0,255,0.8) - hsl(a): hsla(240,100%,50%,0.8) - Zahlen: 1, 2, 3 ... 10, 11, 12 ... - Deckkraft (in Dezimalzahlen): 0.0 bis 1.0 z.B. 1.4 oder 1.75 - Farbverläufe: linear-gradient(direction, color, color, color) - Beispiel für Farbverläufe: linear-gradient(to right, blue, #33CCFF, rgba(0,0,255,0.8)) - vordefinierte Farbverläufe: transparent,rgba(255,255,255,0.5),transparent -> transparent,rgba(255,255,255,0.0),transparent - keine Farbe oder keine Farbwerte -> verwende "unset" */ /* *************************************************************************************************************************** */ (function() { // PROFILE PHATH "CALCULATE" let ProfileDirectory = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // GENERAL SCROLLBAR SETTINGS const custom_scrollbar_size_value = 17; // in px // default: custom_scrollbar_size_value = 17 // CUSTOM SCROLLBAR SETTINGS ("custom_scrollbar_" --> "cs_") const custom_scrollbars = true; // default: custom_scrollbars = true const custom_scrollbar_arrows = true; // default: custom_scrollbar_arrows = true const cs_thumb_border = 1; // default: cs_thumb_border = 0 / in px 1 const cs_thumb_roundness = 9; // default: cs_thumb_roundness = 0 / in px 9 const cs_buttons_border = 0; // default: cs_buttons_border = 0 / in px const cs_buttons_roundness = 0; // default: cs_buttons_roundness = 0 / in px const cs_thumb_minimal_size = 12; // default: cs_thumb_minimal_size = 12; / in px const cs_ignore_color_gradients = true; // default: cs_ignore_color_gradients = false / 'flat' scrollbars // CUSTOM SCROLLBAR COLORS/GRADIENTS // - background const cs_background_color = "#5b5b66"; // default: cs_background_color = "#DDDDDD" let cs_background_image_vertical = "unset"; // default: cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)" let cs_background_image_horizontal = "unset"; // default: cs_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)" let cs_arrows_on_buttons_buttons_size = 1.0; // default: cs_arrows_on_buttons_buttons_size = 1.0 // - corner const cs_corner_background_color = "#bfbfbf"; // default: cs_corner_background_color = "#DDDDDD" / - corner let cs_corner_background_image = "unset"; // default: cs_corner_background_image = "linear-gradient(45deg,transparent 30%,rgba(255,255,255,0.5) 50%,transparent 70%),linear-gradient(-45deg,transparent 30%,rgba(255,255,255,0.5) 50%,transparent 70%)" // - thumb/slider const cs_thumb_color = "#bfbfbf"; // default: cs_thumb_color = "#33CCFF" / thumb/slider let cs_thumb_image_vertical = "unset"; // default: cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)" let cs_thumb_image_horizontal = "unset"; // default: cs_thumb_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)" const cs_thumb_hover_color = "orange"; // default: cs_thumb_hover_color = "#66FFFF" let cs_thumb_hover_image_vertical = "unset"; // default: cs_thumb_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)" let cs_thumb_hover_image_horizontal = "unset"; // default: cs_thumb_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)" const cs_thumb_border_color = "#5b5b66"; // default: cs_thumb_border_color = "#33CCFF" // - buttons const cs_buttons_color = "#5b5b66"; // default: cs_buttons_color = "#66FFFF" "#5b5b66"/ buttons let cs_buttons_image_vertical = "unset"; // default: cs_buttons_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)" let cs_buttons_image_horizontal = "unset"; // default: cs_buttons_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)" const cs_buttons_hover_color = "#5b5b66"; // default: cs_buttons_hover_color = "#33CCFF" const cs_buttons_border_color = "#5b5b66"; // default: cs_buttons_border_color = "#33CCFF" "#5b5b66" let cs_buttons_hover_image_vertical = "unset"; // default: cs_buttons_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)" let cs_buttons_hover_image_horizontal = "unset"; // default: cs_buttons_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)" /* *************************************************************************************************************************** */ // unset background image color gradients -> flat scrollbars if(cs_ignore_color_gradients === true) cs_background_image_vertical = cs_background_image_horizontal = cs_corner_background_image = cs_thumb_image_vertical = cs_thumb_image_horizontal = cs_thumb_hover_image_vertical = cs_thumb_hover_image_horizontal = cs_buttons_image_vertical = cs_buttons_image_horizontal = cs_buttons_hover_image_vertical = cs_buttons_hover_image_horizontal = "unset"; let custom_scrollbars_code=''; let custom_scrollbar_arrows_code=''; if(custom_scrollbars === true) custom_scrollbars_code=` slider, scrollcorner, scrollbar thumb, scrollbar scrollbarbutton { appearance: auto; -moz-default-appearance: none !important; } slider { background-color: ${cs_background_color} !important; } scrollbar[orient="vertical"] slider { background-image: ${cs_background_image_vertical} !important; } scrollbar[orient="horizontal"] slider { background-image: ${cs_background_image_horizontal} !important; } scrollcorner { background-color: ${cs_corner_background_color} !important; background-image: ${cs_corner_background_image} !important; } scrollbar thumb { background-color: ${cs_thumb_color} !important; border-radius: ${cs_thumb_roundness}px !important; box-shadow: inset 0 0 0 ${cs_thumb_border}px ${cs_thumb_border_color} !important; } scrollbar thumb[orient="vertical"] { background-image: ${cs_thumb_image_vertical} !important; min-height: ${(cs_thumb_minimal_size+cs_thumb_roundness+cs_thumb_border)}px !important; } scrollbar thumb[orient="horizontal"] { background-image: ${cs_thumb_image_horizontal} !important; min-width: ${(cs_thumb_minimal_size+cs_thumb_roundness+cs_thumb_border)}px !important; } scrollbar thumb:hover, scrollbar thumb:active { background-color: ${cs_thumb_hover_color} !important; } scrollbar thumb[orient="vertical"]:hover, scrollbar thumb[orient="vertical"]:active { background-image: ${cs_thumb_hover_image_vertical} !important; } scrollbar thumb[orient="horizontal"]:hover, scrollbar thumb[orient="horizontal"]:active { background-image: ${cs_thumb_hover_image_horizontal} !important; } scrollbar scrollbarbutton { background-color: ${cs_buttons_color} !important; border-radius: ${cs_buttons_roundness}px !important; box-shadow: inset 0 0 0 ${cs_buttons_border}px ${cs_buttons_border_color} !important; height: 17px !important; width: 17px !important; } scrollbar[orient="vertical"] scrollbarbutton { background-image: ${cs_buttons_image_vertical} !important; } scrollbar[orient="horizontal"] scrollbarbutton { background-image: ${cs_buttons_image_horizontal} !important; } scrollbar scrollbarbutton:hover { background-color: ${cs_buttons_hover_color} !important; } scrollbar[orient="vertical"] scrollbarbutton:hover { background-image: ${cs_buttons_hover_image_vertical} !important; } scrollbar[orient="horizontal"] scrollbarbutton:hover { background-image: ${cs_buttons_hover_image_horizontal} !important; } `; if(custom_scrollbar_arrows === true) custom_scrollbar_arrows_code=` scrollbarbutton[type="increment"], scrollbar[orient="vertical"] scrollbarbutton[type="decrement"], scrollbarbutton[type="increment"], scrollbar[orient="horizontal"] scrollbarbutton[type="decrement"] { background-repeat: no-repeat; background-position: center !important; */ } scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] { background-image: url("${ProfileDirectory}/Pfeil-hoch_hellgrau.svg") !important; /* background-position: top !important; */ } scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] { background-image: url("${ProfileDirectory}/Pfeil-runter_hellgrau.svg") !important; /* background-position: bottom !important; */ } scrollbar[orient="horizontal"] > scrollbarbutton[type="decrement"] { background-image: url("${ProfileDirectory}/Pfeil-links_hellgrau.svg") !important; /* background-position: left !important; */ } scrollbar[orient="horizontal"] > scrollbarbutton[type="increment"] { background-image: url("${ProfileDirectory}/Pfeil-rechts_hellgrau.svg") !important; /* background-position: right !important; */ } /* hover */ scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"]:hover { background-image: url("${ProfileDirectory}/Pfeil-hoch_orange.svg") !important; } scrollbar[orient="vertical"] > scrollbarbutton[type="increment"]:hover { background-image: url("${ProfileDirectory}/Pfeil-runter_orange.svg") !important; */ } scrollbar[orient="horizontal"] > scrollbarbutton[type="decrement"]:hover { background-image: url("${ProfileDirectory}/Pfeil-links_orange.svg") !important; } scrollbar[orient="horizontal"] > scrollbarbutton[type="increment"]:hover { background-image: url("${ProfileDirectory}/Pfeil-rechts_orange.svg") !important; } scrollbar[orient="vertical"] > scrollbarbutton { height: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important; max-width: ${custom_scrollbar_size_value}px !important; } scrollbar[orient="horizontal"] > scrollbarbutton { width: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important; max-height: ${custom_scrollbar_size_value}px !important; } `; Components.classes["@mozilla.org/content/style-sheet-service;1"] .getService(Components.interfaces.nsIStyleSheetService) .loadAndRegisterSheet(Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(` ${custom_scrollbars_code} ${custom_scrollbar_arrows_code} `), null, null), Components.classes["@mozilla.org/content/style-sheet-service;1"] .getService(Components.interfaces.nsIStyleSheetService).AGENT_SHEET); })() /* ************************************************************************************************************************* */ /* Aris neue Version https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/custom_scrollbars.uc.js ***************** */ /* ************************************************************************************************************************* */Kennt jemand die Lösung?
-
Ja, aber nur, wenn er als Schaltfläche eingefügt ist.
Danke für die zusätzliche Info.
-
Ich hab das nun so geändert:
Um Himmelswillen, am frühen Morgen schon so viel Denken!
Der Code ist für die UserCSSLoader.css um dem Menü eine Grafik zu verpassen!
Bis ich das geschnallt habe.Damit sollten beide Positionen zufrieden gestellt sein.
Super.Du kannst ja mal explizit auf false setzen, dann erscheint das Menü, aber das tut bei mir nichts.
Kann man den "überflüssigen" Code dann nicht entfernen?
Denn ich habe es nachgestellt, und es tut sich auch bei mir nichts! -
Bitte nicht umbauen. Ich finde das genial und nutze es seit Jahr und Tag. Das wird bei mir in zwei weiteren Skripten verwendet (extras_config_menu und AppMenu) und so muss ich das nicht in jedem Skript, wo der Editor gebraucht wird, einbauen.
Ist dann wohl eine "Geschmacksfrage"! Denn ich würde es viel lieber in einem Skript definieren, als Hand an
Firefoxinterna anzulegen.
Des Weiteren nutze ich für Code VS-Code, für ander Dinge aber eben Notepad oder Notepad ++
Und jedes Mal ist das im Skript definiert!
Aber man könnte ja so etwas wie eine Weiche einbauen!
Wer Anwendungen "Global" definieren möchte, nimmt Option "var globle = 1" wer nicht halt "0" -
Mal blöd gefragt.
Am welcher Stelle soll den DAS im Menü auftauchen?JavaScript
Alles anzeigenmenu = $C("menu", { label: ".uc.css", accesskey: "U", //acceltext: "U", hidden: !UCL.USE_UC }); menupopup.appendChild(menu); mp = $C("menupopup", { id: "usercssloader-ucmenupopup" }); menu.appendChild(mp); let UCrebuild = $C("menuitem", { label: "Importieren(.uc.js)", }); UCrebuild.addEventListener("command", () => UCL.UCrebuild()); mp.appendChild(UCrebuild); mp.appendChild($C("menuseparator", { id: "usercssloader-ucseparator" }));Ich finde DAS nicht im Menü.
-
Such mal nach let editor = Services.prefs.getCharPref("view_source.editor.path"); und ersetze alles nach dem Gleichheitszeichen mit dem Pfad zu einem Editor (Anführungszeichen und Semikolon nicht vergessen), Wenn es funktioniert, sollte man das tatsächlich umbauen können (sollte eigentlich gehen).
Funktioniert!
let editor = 'C:\\Windows\\System32\\notepad.exe'; und z.B. userChrome.css wird in Notepad geöffnet.
Wie gesagt, bei mir funktioniert das genau so.
"CSS" Menüeintrag in der Menüleiste, funktioniert mit Deiner neuen Version auch!!
Komisch, was ich da wohl gemacht habe? -
Just_Another_Constant_with_XUL_in_its_name_to_confuse_Mira_Belle




