Freiheit für den Dateipfad 🤡️ .
Beiträge von Mitleser
-
-
Was denn nun A oder B?
A.
wir haben doch hier eine Konvention, dass wir empfehlen, für die Grafiken einen Unterordner icons im Ordner chrome des Profils zu nutzen
(Link wäre hilfreich)
oder
B.
Ich denke, es sollte eine Konvention geben
Warum meinst du das? Eine Begründung wäre schön.
-
JavaScript
Alles anzeigen// JavaScript Document // MyLinkButton.uc.js (function() { // start config---------------------------------- let buttonIcon = "16_checkbox-circle_white.svg" // Name & Dateiendung des anzuzeigenden Symbols let buttonPath = "/chrome/css/image/" // Pfad zum Ordner der das Icon beinhaltet // end config----------------------------------- if (location.href !== 'chrome://browser/content/browser.xhtml') return; try { CustomizableUI.createWidget({ id: 'aboutabout-ToolBarButton', type: 'custom', defaultArea: CustomizableUI.AREA_NAVBAR, onBuild: function(aDocument) { var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton'); var props = { id: 'aboutabout-ToolBarButton', class: 'toolbarbutton-1 chromeclass-toolbar-additional', removable: 'true', label: 'About:About', accesskey: '', tooltiptext: 'About:About', style: "list-style-image: url('" + PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir)) + buttonPath + buttonIcon + "');", onclick: 'if (event.button == 0) { \ openTrustedLinkIn("about:about", "tab");\ }; ' }; for (var p in props) toolbaritem.setAttribute(p, props[p]); return toolbaritem; } }); } catch(e) { }; })();
-
Externer Inhalt www.youtube.comInhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.
-
Da ich die Sidebar sowieso nie nutzen, soll es an dieser Stelle gut sein.
Aber eine Chance hätte ich gerne noch:
-
Bleibt jetzt nur noch das elendige "Türkies" welches ich ausblenden möchte
Für die accent-color deckt eigentlich dies hier fast alles ab (muss in userContent und userChrome):
CSS
Alles anzeigen* { /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ /*findbar*/ --input-border-color: #f60 !important; /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ --in-content-link-color: green !important; /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ --button-primary-bgcolor: green !important; --button-primary-hover-bgcolor: lightgray !important; --button-primary-active-bgcolor: lightgray !important; /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ --primary-button-background-color: #f60 !important; --primary-button-hover-background-color: green !important; /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ --in-content-primary-button-background: green !important; --in-content-primary-button-background-hover: #dddddd !important; --in-content-primary-button-background-active: #ffffff !important; /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ --in-content-link-color: #f60 !important; --in-content-link-color-hover: #f60 !important; --in-content-link-color-active: #f60 !important; /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ /*Checkboxes*/ --checkbox-border-color: red !important; /*-------------------------------------------------*/ --checkbox-checked-bgcolor: green !important; --checkbox-checked-color: yellow !important; --checkbox-checked-hover-bgcolor: lightgray !important; --checkbox-checked-active-bgcolor:#ffffff !important; --checkbox-checked-border-color: #dddddd !important; /*-------------------------------------------------*/ --checkbox-unchecked-bgcolor: teal !important; --checkbox-unchecked-hover-bgcolor: lightgray !important; --checkbox-unchecked-active-bgcolor: #ffffff !important; } /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/ /*toggle-button*/ .toggle-button[aria-pressed="true"]::before { background-color: #232323 !important; } .toggle-button[aria-pressed="true"] { background: green !important; border-color: transparent; } .toggle-button:hover[aria-pressed="true"] { background: red !important; border-color: transparent; } .toggle-button:active[aria-pressed="true"] { background: #ffffff !important; border-color: transparent !important; } .toggle-button { --toggle-background-color: #f60 !important; --toggle-background-color-hover: green !important; --toggle-background-color-active: #ffffff !important; --toggle-background-color-pressed: blue !important; --toggle-background-color-pressed-hover: purple !important; --toggle-background-color-pressed-active: green !important; } /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
-
da ist ja noch dieser kleine Pfeil
Dies meintest du wohl nicht:
CSS
Alles anzeigen.sidebar-placesTreechildren::-moz-tree-twisty(open) { fill: red !important; fill-opacity: 1.0 !important; opacity: 1!important; } .sidebar-placesTreechildren::-moz-tree-twisty(closed) { fill: green !important; fill-opacity: 1.0 !important; opacity: 1!important; } .sidebar-placesTreechildren::-moz-tree-twisty(open, hover) { fill: blue !important; fill-opacity: 1.0 !important; opacity: 1!important; } .sidebar-placesTreechildren::-moz-tree-twisty(closed, hover) { fill: yellow !important; fill-opacity: 1.0 !important; opacity: 1!important; }
-
Ich denke dieser Post ist hier besser aufgehoben als in diesem Thema:
Es geht um den Button um weiteres Profil zu öffnen
Ich (Linux FF 116.0.3) habe festgestellt, dass bei mir bei eingetragenem zweiten Profil - im Gegensatz zu 'Profilmanager öffnen' (wo alle Versionen funktionieren) - lediglich die Version 2a funzt.
Es muss der Startparameter -foreground sowie der EventListener document.getElementById('profileschange-button').addEventListener("click",onClick); zwingend vorhanden sein.
Spoiler anzeigen
Dies läuft hier auf Linux (mit für Win angepasster 'execPath'-Variable) :
JavaScript
Alles anzeigen(function() { // start config---------------------------------- let buttonIcon = "default-browser-red.svg" // Name.Dateiendung des anzuzeigenden Symbols | Name.file extension of the symbol to be displayed let buttonPath = "/chrome/icons/" // Pfad zum Ordner der das Icon beinhaltet | Path to folder containing the icon let execPath= "C:\\Program Files\\Mozilla Firefox\\firefox.exe" // Windows // Pfad zur ausführbaren Programmdatei | Path to executable program file // "/Applications/Firefox.app/Contents/MacOS/firefox" // MacOS // "/home/'username'/Programme/Firefox/firefox/firefox" // Linux let profileName = "Test-Benutzer" // Name des zweiten Profils | Name of the second profile // end config----------------------------------- if (location.href !== 'chrome://browser/content/browser.xhtml') return; try { CustomizableUI.createWidget({ id: 'profileschange-button', type: 'custom', defaultArea: CustomizableUI.AREA_NAVBAR, onBuild: function(aDocument) { var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton'); var props = { id: 'profileschange-button', class: 'toolbarbutton-1 chromeclass-toolbar-additional', removable: 'true', label: 'Profile Changer', accesskey: '', tooltiptext: 'Test-Profil in neuem Fenster öffnen', style: "list-style-image: url('" + PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir)) + buttonPath + buttonIcon + "');", }; for (var p in props) toolbaritem.setAttribute(p, props[p]); return toolbaritem; } }); } catch(e) { }; document.getElementById('profileschange-button').addEventListener("click",onClick); function onClick(event) { if (event.button != 0){ return; } let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); let arguments = ["-no-remote", "-P", profileName, "-foreground"]; file.initWithPath(execPath); let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess); process.init(file); process.run(false, arguments, arguments.length); } })();
Vielleicht hilft's.
-
Wegen dieses Buttons habe ich mir endlich ein Test-Profil angelegt.
Mehrmaliges Cache leeren per 'Start-cache löschen'-Button hat auch nichts geändert.
Inhalt des Ordners 'startupCache' gelöscht, beim nächsten Neustart haben dann auch die Skripte funktioniert. Es führen eben viele Wege nach Rom.
-
Lass das Original doch mal durch die Online-Software aus Beitrag #9 laufen, das Original ist zwar schon 16x16 px, aber trotzdem mal auf 16x16 px einstellen und staunen.....
-
Und noch 'gekürzter':
XML<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1"> <g id="default-browser-red"> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 8 5.5 C 8 5.5 8 1.5 11.5 1.5 C 15 1.5 15 4.5 15 5.5 C 15 10 8 14.5 8 14.5 Z M 8 5.5 "/> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 8 5.5 C 8 5.5 8 1.5 4.5 1.5 C 1 1.5 1 4.5 1 5.5 C 1 10 8 14.5 8 14.5 L 9 8.5 Z M 8 5.5 "/> </g> </svg>
-
Nur mal so nebenbei, bei deinem Icon aus:
Dort müsst Ihr das Symbol, welches sich in der Zip verbirgt, hinkopieren.
default-browser-red.zip
sieht der 'einigermaßen bereinigte' Quelltext so aus:
XML<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1"> <g id="default-browser-red"> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 10.320312 9.359375 C 10.320312 9.359375 10.320312 8.558594 9.515625 8.558594 C 8.710938 8.558594 8.710938 9.160156 8.710938 9.359375 C 8.710938 10.261719 10.320312 11.160156 10.320312 11.160156 L 10.550781 9.960938 Z M 10.320312 9.359375 "/> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 9.53125 9.058594 C 9.53125 9.058594 9.53125 7.78125 10.648438 7.78125 C 11.769531 7.78125 11.769531 8.738281 11.769531 9.058594 C 11.769531 10.5 9.53125 11.941406 9.53125 11.941406 Z M 9.53125 9.058594 "/> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 9.148438 7.820312 C 9.148438 7.820312 9.148438 6.539062 8.03125 6.539062 C 6.910156 6.539062 6.910156 7.5 6.910156 7.820312 C 6.910156 9.261719 9.148438 10.699219 9.148438 10.699219 L 9.46875 8.78125 Z M 9.148438 7.820312 "/> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 8 5.5 C 8 5.5 8 1.5 11.5 1.5 C 15 1.5 15 4.5 15 5.5 C 15 10 8 14.5 8 14.5 Z M 8 5.5 "/> <path style=" stroke:none;fill-rule:nonzero;fill:#ff1500;fill-opacity:1;" d="M 8 5.5 C 8 5.5 8 1.5 4.5 1.5 C 1 1.5 1 4.5 1 5.5 C 1 10 8 14.5 8 14.5 L 9 8.5 Z M 8 5.5 "/> </g> </svg>
anstatt:
XML
Alles anzeigen<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="16" height="16" viewBox="0 0 16 16" xml:space="preserve"> <desc>Created with Fabric.js 5.2.4</desc> <defs> </defs> <g transform="matrix(1 0 0 1 8 8)" id="f7ccb41e-0f1e-4a0a-b24a-cd5290fc41da" > <rect style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1; visibility: hidden;" vector-effect="non-scaling-stroke" x="-8" y="-8" rx="0" ry="0" width="16" height="16" /> </g> <g transform="matrix(Infinity NaN NaN Infinity 0 0)" id="7ad56bc3-4418-4e4e-8c98-15f3df2e9cae" > </g> <g transform="matrix(0.01 0 0 0.01 25.04 25.36)" > <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-11.5, -8.5)" d="M 8 6 C 8 6 8 2 11.5 2 C 15 2 15 5 15 6 C 15 10.5 8 15 8 15 z" stroke-linecap="round" /> </g> <g transform="matrix(0.23 0 0 0.2 9.63 9.86)" > <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-5, -8.5)" d="M 8 6 C 8 6 8 2 4.5 2 C 1 2 1 5 1 6 C 1 10.5 8 15 8 15 L 9 9 z" stroke-linecap="round" /> </g> <g transform="matrix(0.32 0 0 0.32 10.65 9.86)" > <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-11.5, -8.5)" d="M 8 6 C 8 6 8 2 11.5 2 C 15 2 15 5 15 6 C 15 10.5 8 15 8 15 z" stroke-linecap="round" /> </g> <g transform="matrix(0.32 0 0 0.32 8.19 8.62)" > <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-5, -8.5)" d="M 8 6 C 8 6 8 2 4.5 2 C 1 2 1 5 1 6 C 1 10.5 8 15 8 15 L 9 9 z" stroke-linecap="round" /> </g> <g transform="matrix(1 0 0 1 8 8)" > <g style="" vector-effect="non-scaling-stroke" > <g transform="matrix(1 0 0 1 3.5 0)" > <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,21,21); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-11.5, -8.5)" d="M 8 6 C 8 6 8 2 11.5 2 C 15 2 15 5 15 6 C 15 10.5 8 15 8 15 z" stroke-linecap="round" /> </g> <g transform="matrix(1 0 0 1 -3 0)" > <path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,21,21); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-5, -8.5)" d="M 8 6 C 8 6 8 2 4.5 2 C 1 2 1 5 1 6 C 1 10.5 8 15 8 15 L 9 9 z" stroke-linecap="round" /> </g> </g> </g> </svg>
-
Kein Problem, dachte file.initWithPath sollte Betriebssystemunabhängig werden? Benötige den Button eigenlich nicht. Teste trotzdem.
Der Pfad hier auf Linux mit dem Benutzer 'hanswurst' ist:
file.initWithPath("/home/hanswurst/Programme/Firefox/firefox/firefox");
Ergebnis:
Testversion_1.js Icon ja Profilmanager ja
Testversion_1a.js Icon ja Profilmanager ja
Testversion_2.js Icon ja Profilmanager ja
Testversion_2a.js Icon ja Profilmanager ja
-
Sorry, bin da raus, weil das hier mit Linux garantiert nicht funktioniert:
file.initWithPath("C:\\Program Files\\Mozilla Firefox\\firefox.exe");
-
hier ganz rechts, oben, in Rot, kaum noch zu erkennen.
Das kann ich nirgends finden.
Kannst Du es mir bitte rauf laden?
Edit
Noch besser, hier ist die Quelle:
-
Einen Tipp hätte ich noch:
Sollte der style im icon mal fehlen, wird diese Angabe beim scallieren mit diesem Onlinetool hinzugefügt, allerdings mit fill:rgb(0%,0%,0%);fill-opacity:1; :
Online die Bildgröße mehrerer Bilder gleichzeitig ändernVerändern Sie kostenlos die Größen mehrerer JPG-, PNG-, SVG- oder GIF-Bilder in nur wenigen Sekunden. Durch eine Änderung der Prozent- oder Pixelvorgaben…www.iloveimg.comMache Feierabend, Icon kommt morgen...
-
-
Letzte beiden sind im Übrigen die gleichen Symbole, aber unteres ist das "originale", schwarz und leider nicht per CSS-Code einfärbbar
So gehts:
XML<svg enable-background="new 0 0 512 512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <path style="stroke:none;fill-rule:nonzero;fill:context-fill;fill-opacity:context-fill-opacity;" d="M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM609.3 512H471.4c5.4-9.4 8.6-20.3 8.6-32v-8c0-60.7-27.1-115.2-69.8-151.8c2.4-.1 4.7-.2 7.1-.2h61.4C567.8 320 640 392.2 640 481.3c0 17-13.8 30.7-30.7 30.7zM432 256c-31 0-59-12.6-79.3-32.9C372.4 196.5 384 163.6 384 128c0-26.8-6.6-52.1-18.3-74.3C384.3 40.1 407.2 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112z"/></svg>
-
-
In den .svg's ändere ich:
fill:context-fill;fill-opacity:context-fill-opacity;
Und im .css 'färbe' ich sie mit:
fill: orange !important;
fill-opacity: 1 !important;
ein.