Hier mal die FirefoxLoader.exe mit neuem Icon (FF70).
Beiträge von genetic
-
-
Danke, aber meine Grafiktreiber sind top-aktuell.
-
...habe jetzt herausgefunden, dass es an der Hardwarebeschleunigung liegt - ohne diese, ist das schwarze Quadrat weg.
Hat jemand eine Idee, wie ich das Quadrat weg bekomme, OHNE die Hardwarebeschleunigung zu deaktivieren?
-
Hallo zusammen,
bis auf diesen Fehler, konnte ich alle mit Lesen eurer tollen Anleitungen, selber beheben (browser.xhtml und createXULElement).
Wie man sieht, wird mir links, oben, ein schwarzes Quadrat angezeigt
Ich vermute, dass es durch den Code für "abgerundete Tabs" kommt.
Um den Rahmen hier nicht zu sprengen, füge ich euch deshalb nur mal diesen Code, der userChrome.css ein:
CSS
Alles anzeigen/******************* Abgerundete Tabs ********************/ :root { --tab-curve-width: 30px; --tabs-border: transparent !important; } .arrowscrollbox-scrollbox { padding-inline-start: 10px !important; } /* To be able to see the top border of the tab */ .tab-stack { margin-top: 2px !important; } /* When the window is maximized, the first pinned tab is properly displayed. */ #TabsToolbar { padding-inline-start: 15px !important; } .titlebar-placeholder { border: none !important; } /* Remove unneeded styles from Photon */ .tabbrowser-tab::before, .tabbrowser-tab::after { border: none !important; } .tabbrowser-tab > .tab-stack > .tab-background { background-image: none !important; -moz-box-orient: horizontal !important; background-color: transparent !important; margin-top: 1px !important; } .tab-background[selected="true"] { border: none !important; } .tab-line { display: none !important; } .tab-bottom-line { display: none !important; } /* Match height of new tab button (right svg) on hover */ .tabs-newtab-button { margin: 0 !important; } /* overlap the tab curves */ .tab-background { -moz-margin-end: -15px !important; -moz-margin-start: -15px !important; } /* Begin tab background customizations */ .tab-background[selected="true"]::before { border: none !important; content: "" !important; width: 30px !important; min-height: 30px !important; display: -moz-box !important; background-repeat: no-repeat !important; } .tab-background[selected="true"]::after { border: none !important; content: "" !important; width: 30px !important; min-height: 30px !important; display: -moz-box !important; background-repeat: no-repeat !important; } .tab-background[selected="true"] > spacer { margin-top: 0px !important; } #new-tab-button, .tabs-newtab-button { fill:white!important; width: calc(36px + 30px) !important; margin-inline-start: -15px !important; margin-top: 1px !important; } /* Tab hover customizations */ /* Regular tabs */ .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true])::before { display: -moz-box !important; background-repeat: no-repeat !important; content: "" !important; width: 30px !important; min-height: 30px !important; background-color: transparent !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true])::after { display: -moz-box !important; background-repeat: no-repeat !important; content: "" !important; width: 30px !important; min-height: 30px !important; background-color: transparent !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) > spacer { margin-top: 0px !important; } #TabsToolbar[brighttext] > #tabbrowser-tabs > .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]), .tabs-newtab-button:hover, .tabs-newtab-button:hover::before, .tabs-newtab-button:hover::after { background-color: transparent !important; } /* New tab hover customizations */ .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]), .tabs-newtab-button:hover { background-position: 0px 2px, 30px 4px , 36px 2px !important; background-repeat: no-repeat !important; background-size: 30px 30px, calc(100% - (2 * 30px)) 30px, 30px !important; } .tabs-newtab-button:hover > .toolbarbutton-icon { background: none !important; background-color: transparent !important; } /* Color specific customizations */ :root { --svg-selected-before: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-start)'><div id='tab-background-fill' style='background-color:rgb(245,246,247);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"); --svg-selected-after: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-end)'><div id='tab-background-fill' style='background-color:rgb(245,246,247);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"); --background-selected-middle: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0)), linear-gradient( transparent 2px, rgb(245,246,247) 2px, rgb(245,246,247) ), none; --svg-hover-before: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='30px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='30' clip-path='url(%23tab-curve-clip-path-start)'><div id='tab-background-fill' style='background-color:rgba(81,156,214,1);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"); --svg-hover-after: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-end)'><div id='tab-background-fill' style='background-color:rgba(81,156,214,1);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"); --background-hover-middle: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0)), linear-gradient( transparent 2px, rgba(81,156,214,1) 2px, rgba(81,156,214,1) ), none !important; --newtab-hover: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-start)'><div id='tab-background-fill' style='background-color:rgba(81,156,214,1);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"), linear-gradient(rgba(81,156,214,1), rgba(81,156,214,1)), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='30px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-end)'><div id='tab-background-fill' style='background-color:rgba(81,156,214,1);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"); } /* OS-specific color variables */ @media screen and (-moz-windows-theme) { :root { } } @media not screen and (-moz-windows-theme) { :root { } } .tab-background[selected="true"]::before { background-image: var(--svg-selected-before) !important; } .tab-background[selected="true"]::after { background-image: var(--svg-selected-after) !important; } .tab-background[selected="true"] > spacer { background-image: var(--background-selected-middle) !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true])::before { background-image: var(--svg-hover-before) !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true])::after { background-image: var(--svg-hover-after) !important; } .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]) > spacer { background-image: var(--background-hover-middle) !important; } .tabs-newtab-button:hover { background-image: var(--newtab-hover) !important; } .tab-close-button.close-icon:hover { background-color: rgb(255,0,0,.5) !important; }
Danke im Voraus, für eure Hilfe
-
Hat geklappt.
Vielen Dank für eure Hilfe. :klasse:
-
Nicht der Hintergrund sollte die andere Farbe haben, sondern nur der Text (und die Grafik):
Mit dem Text konnte ich selber lösen:
Codedata:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="context-fill" fill-opacity="context-fill-opacity" d="....................................
Wie mache ich das, wenn es nicht "red" sein soll, sondern die Farbe #00437A?
-
Verstehe. ist aber nicht so tragisch, wenn der eine Eintrag bleibt.
-
:klasse: Perfekt.
"Flagfox" ist zwar noch sichtbar, bekommt man einzeln aber vermutlich nicht weg - oder?
-
Also mein Kontextmenü sieht derzeit so aus:
[attachment=0]Zwischenablage01.jpg[/attachment]
und mein Code in der css so:
Code
Alles anzeigen#context-openlinkprivate, #context-sendlinktodevice, #context-sendpagetodevice, #context-bookmarklink, #context-sendimage, #context-openlinkinusercontext-menu, menuitem[label="Tab an Gerät senden"], menuitem[label="Seite an Gerät senden"], menuitem[label="Element untersuchen"], /menuitem[label="Link in neuem Tab öffnen"], menuitem[label="Link in neuem privaten Fenster öffnen"], menuitem[label="Link bei Pocket speichern"], menuitem[label="Seite bei Pocket speichern"], menuitem[label="Auswahl-Quelltext anzeigen"], menuitem[label="Seitenquelltext anzeigen"], menuitem[label="Seiteninformationen anzeigen"], menuitem[label="Hintergrundgrafik anzeigen"], menuitem[label="Bildschirmfoto aufnehmen"], menuseparator#inspect-separator, menuseparator#context-sep-sendlinktodevice{ display:none!important}
Es soll aber noch weg:
Link in neuem priv. Fenster öffnen
Lesezeichen für diesen Link...
Link in Pocket speichern
Link an Gerät senden
(idealerweise) FlagfoxHast Du einen Tipp für mich?
-
Ja, dieses Script:
Code
Alles anzeigen(function() { var menuitem = document.createElement('toolbarbutton'); menuitem.id = 'uc_menu_Restart_H'; menuitem.classList.add('subviewbutton', 'subviewbutton-iconic'); menuitem.setAttribute('label' , 'Neustart'); menuitem.setAttribute('tooltiptext' , 'Neustart'); menuitem.style.listStyleImage= 'url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="context-fill" fill-opacity="context-fill-opacity" d="M15,1a1,1,0,0,0-1,1V4.418A6.995,6.995,0,1,0,8,15a6.954,6.954,0,0,0,4.95-2.05,1,1,0,0,0-1.414-1.414A5.019,5.019,0,1,1,12.549,6H10a1,1,0,0,0,0,2h5a1,1,0,0,0,1-1V2A1,1,0,0,0,15,1Z"/></svg>\')'; menuitem.setAttribute('oncommand' , "Services.appinfo.invalidateCachesOnRestart() || BrowserUtils.restartApplication();"); var refItem = document.getElementById('appMenu-quit-button'); refItem.parentNode.insertBefore(menuitem, refItem); })();
Es hat vorne ein Symbol, gefolgt vom Text "Neustart"...das Ganze soll in Farbe #00437A sein.
-
Ich hab mal hier was hochgeladen, wo man sieht was wohin gehört
https://workupload.com/file/gths2tny1.000 Dank! :klasse:
Hat auf Anhieb, astrein geklappt.
Noch eine Frage zum Script mit dem Restart-Button: Wo/wie ändere ich da die Farbe des Eintrags?
-
Da gibt es aber nirgendwo mehr die datein für den Download!
-
So genau kann ich dir das nicht sagen. Hole dir die Dateien, wie schon geschrieben, von Endors Seite aus Beitrag #62. Was ich auf jeden Fall schon gesehen habe:In der config-prefs.js fehlt folgende Zeile:
Die Datei main.js im Ordner userChromeJS sollte mindestens von 26.03.2018 sein.
Die Zeile habe ich ergänzt!
Ordnerstruktur: Da checkt doch kein normaler Mensch (mehr) durch. Ordner userChromeJS wo soll der sein? Gibt's keine aktuelle und TRANSPARENTE Beschreibung bzgl. der Ordnerstruktur?
Diese hier, ist uralt und passt nicht mehr, weil man keine ZIP mehr runter laden kann.
https://www.camp-firefox.de/forum/viewtopic.php?f=16&t=122538
-
Die Scripte müssen abe nicht direkt in den Profilordner, sondern in den Unterordner chrome?
-
Sind folg. Inhalte richtig?
config.js
Code
Alles anzeigen// /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the userChrome.js component. * * The Initial Developer of the Original Code is * Simon Bünzli <zeniko@gmail.com> * * Portions created by the Initial Developer are Copyright (C) 2007 * the Initial Developer. All Rights Reserved. * * Contributor(s): * alta88 <alta88@gmail.com> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ try { /*Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); */ Components.utils.import("resource://gre/modules/osfile.jsm"); function UserChrome_js() { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); os.addObserver(this, "final-ui-startup", false); }; UserChrome_js.prototype = { /*// Properties required for XPCOM registration: classDescription: "userChromeJS Loading Component", classID : Components.ID("{8DEB3B5E-7585-4029-B6D0-4733CE8DED50}"), contractID : "@userChromeJS;1", _xpcom_categories: [{ category: "app-startup", service: true }], */ /* ........ QueryInterface .................................................. */ /* QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsISupports, Components.interfaces.nsIObserver, Components.interfaces.nsIModule, Components.interfaces.nsIFactory, Components.interfaces.nsIDOMEventListener]), */ /* ........ nsIObserver ..................................................... */ observe: function(aSubject, aTopic, aData) { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); switch (aTopic) { /* case "app-startup": case "profile-after-change": os.addObserver(this, "final-ui-startup", false); break; */ case "final-ui-startup": var file = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("UChrm", Components.interfaces.nsIFile); file.append("userChrome.js"); /* if (!file.exists()) { var componentFile = __LOCATION__; var componentsDir = componentFile.parent; var extensionDir = componentsDir.parent; extensionDir.append("README.txt"); if (extensionDir.exists()) extensionDir.copyTo(file.parent, "userChrome.js"); } */ if (file.exists() && file.isFile() && !Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime) .inSafeMode) { this.mFileURL = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService) .getProtocolHandler("file") .QueryInterface(Components.interfaces.nsIFileProtocolHandler) .getURLSpecFromFile(file); var path = OS.Constants.Path.libDir; path = OS.Path.join(path, "userChromeJS.js"); this.uCFileURI = OS.Path.toFileURI(path); os.addObserver(this, "domwindowopened", false); } break; case "domwindowopened": aSubject.addEventListener("load", this, true); break; } }, /* ........ nsIDOMEventListener ............................................. */ handleEvent: function(aEvent) { var document = aEvent.originalTarget; if (document.location && document.location.protocol == "chrome:") { try { let loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); /* loader.loadSubScript("chrome://userChromeJS/content/userChromeJS.js", document.defaultView, "UTF-8"); */ loader.loadSubScript(this.uCFileURI, document.defaultView, "UTF-8"); loader.loadSubScript(this.mFileURL, document.defaultView, "UTF-8"); } catch (ex) { // script execution can be stopped with |throw "stop";| if (ex !== "stop") { Components.utils.reportError(ex); } } } } }; /** * The following line is what XPCOM uses to create components. Each component * prototype must have a .classID which is used to create it. * * XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4). */ /*var NSGetFactory = XPCOMUtils.generateNSGetFactory([UserChrome_js]); */ new UserChrome_js(); } catch(ex) { Components.utils.reportError(ex); };
config-prefs.js
userChromeJS.js
Code
Alles anzeigen/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the userChromeJS utilities. * * The Initial Developer of the Original Code is * alta88 <alta88@gmail.com> * * Portions created by the Initial Developer are Copyright (C) 2014 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ var EXPORTED_SYMBOLS = ["userChrome"]; /* ........ Utility functions ............................................... */ var userChrome = { path: null, dirToken: null, get loadOverlayDelay () { if (!this._loadOverlayDelay) this._loadOverlayDelay = 500; return this._loadOverlayDelay; }, set loadOverlayDelay(delay) { this._loadOverlayDelay = delay; }, get loadOverlayDelayIncr() { if (!this._loadOverlayDelayIncr) this._loadOverlayDelayIncr = 1600; return this._loadOverlayDelayIncr; }, set loadOverlayDelayIncr(delay) { this._loadOverlayDelayIncr = delay; }, import: function(aPath, aRelDirToken) { let file; this.path = aPath; this.dirToken = aRelDirToken; if (aRelDirToken) { // Relative file let absDir = this.getAbsoluteFile(aRelDirToken); if (!absDir) return; let pathSep = absDir.path.match(/[\/\\]/)[0]; file = absDir.path + (aPath == "*" ? "" : pathSep + aPath.replace(/[\/\\]/g, pathSep)); } else // Absolute file file = aPath; file = this.getFile(file); if (!file) return; if (file.isFile()) { if (/\.js$/i.test(file.leafName)) this.loadScript(file, aRelDirToken, null); else if (/\.xul$/i.test(file.leafName)) { let xul_files = []; xul_files.push(file); this.loadOverlay(xul_files, this.dirToken, null, this.loadOverlayDelay); // this.loadOverlayDelay = this.loadOverlayDelay + this.loadOverlayDelayIncr; } else this.log("File '" + this.path + "' does not have a valid .js or .xul extension.", "userChrome.import"); } else if (file.isDirectory()) this.importFolder(file); else this.log("File '" + this.path + "' is neither a file nor a directory.", "userChrome.import"); }, loadScript: function(aFile, aFolder, aRelDirToken) { setTimeout(function() { Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader) .loadSubScript(userChrome.getURLSpecFromFile(aFile), null, // defaults to the global object of the caller. userChrome.charSet); // log it userChrome.log(aRelDirToken ? ("[" + aRelDirToken + "]/" + (aFolder && aFolder != "*" ? aFolder + "/" : "") + aFile.leafName) : aFile.path, "userChrome.loadScript"); }, 0); }, // XXX: Due to bug 330458, an overlay must finish before another can be // called, otherwise neither are successful. Implementing an observer to // serialize is better left as a fix in the core bug. Here, settimout values // are set to minimize but there is no quarantee; overlay cdata (if any) // needs to consider overlay completions and logging does not strictly mean // an overlay has completed, rather that the overlay file has been invoked. loadOverlay: function(aFiles, aRelDirToken, aFolder, aDelay) { //userChrome.log(aDelay+" multiple import delay", userChrome.loadOverlay); // Increment multiple import delay this.loadOverlayDelay = this.loadOverlayDelay + this.loadOverlayDelayIncr; setTimeout(function() { if (aFiles.length > 0) { //userChrome.log(userChrome.loadOverlayDelay+" inter folder delay", userChrome.loadOverlay); // log it userChrome.log(aRelDirToken ? ("[" + aRelDirToken + "]/" + (aFolder && aFolder != "*" ? aFolder + "/" : "") + aFiles[0].leafName) : aFiles[0].path, "userChrome.loadOverlay"); document.loadOverlay(userChrome.getURLSpecFromFile(aFiles.shift()), null); setTimeout(arguments.callee, userChrome.loadOverlayDelay); } }, aDelay); }, // Include all files ending in .js and .xul from passed folder importFolder: function(aFolder) { let files = aFolder.directoryEntries .QueryInterface(Components.interfaces.nsISimpleEnumerator); let xul_files = []; while (files.hasMoreElements()) { let file = files.getNext().QueryInterface(Components.interfaces.nsIFile); if (/\.js$/i.test(file.leafName) && file.leafName != "userChrome.js") this.loadScript(file, this.path, this.dirToken); else if (/\.xul$/i.test(file.leafName)) { xul_files.push(file); } } if (xul_files.length > 0) this.loadOverlay(xul_files, this.dirToken, this.path); }, getFile: function(aPath, aRelDirToken) { try { let file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsIFile); file.initWithPath(aPath); // Bad file doesn't throw on initWithPath, need to test if (file.exists()) return file; this.log("Invalid file '" + this.path + (this.dirToken ? ("' or file not found in directory with token '" + this.dirToken) : "") + "' or other access error.", "userChrome.getFile"); } catch (e) { // Bad folder throws on initWithPath this.log("Invalid folder '" + this.path + (this.dirToken ? ("' or folder not found in directory with token '" + this.dirToken) : "") + "' or other access error.", "userChrome.getFile"); } return null; }, getAbsoluteFile: function(aRelDirToken) { try { let absDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get(aRelDirToken, Components.interfaces.nsIFile); return absDir; } catch (e) { this.log("Invalid directory name token '" + this.dirToken + "' or directory cannot be accessed.", "userChrome.getAbsoluteFile"); return null; } }, getURLSpecFromFile: Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService) .getProtocolHandler("file") .QueryInterface(Components.interfaces.nsIFileProtocolHandler) .getURLSpecFromFile, /* Console logger */ log: function(aMsg, aCaller) { Components.classes["@mozilla.org/consoleservice;1"] .getService(Components.interfaces.nsIConsoleService) .logStringMessage(this.date + " userChromeJS " + (aCaller ? aCaller +": " : "") + aMsg); }, get dateFormat() { if (!this._dateFormat) this._dateFormat = "%Y-%m-%d %H:%M:%S"; return this._dateFormat; }, set dateFormat(format) { this._dateFormat = format; }, get date() { let date = new Date(); return date.toLocaleFormat(this.dateFormat); }, set charSet(val) { this._charSet = val; }, get charSet() { if (!this._charSet) this._charSet = "UTF-8"; // use "UTF-8". defaults to ascii if null. return this._charSet; } };
userChrome.js
-
Lege dir am besten ein Lesezeichen auf folgende Seite an:https://github.com/Endor8/userChrome.js
Dort ganz unten wird die Einrichtung für die Skriptnutzung ausführlich beschrieben.
Danke Dir! :klasse: Auf der Seite war ich bereits.
Habe jetzt mal alles nach Anleitung gemacht, geht aber noch immer nicht. Werde mal weiter probieren...(ein echter Sch***)
-
Du weißt, dass auch im Installationsverzeichnis von Firefox Dateien sein müssen, die zum Ausführen von Benutzerskripten benötigt werden? Vergleiche noch mal mit hier:https://www.camp-firefox.de/forum/viewtopic.php?f=16&t=122538
Jetzt, ja bzw. wieder. Ich weiß nur nicht (mehr) wo ich die Dateien bei einem Port. FF hinkopieren muss? Da gibt es ja kein Install-Verzeichnis.
Siehe oben (#58) hatte zwischenzeitlich korrigiert/nachgebessert.
-
Ähm - leider nicht bei mir :cry:
Edit: Es funktioniert noch nichtmal bei einem neuen, völlig cleanen FF Port.
Edit 2: So wie es aussieht, funktionieren alle js-Scrips nicht - nur die userChrome.css (bin ratlos).Edit 3: Habe die Ursache, aber noch keine Lösung gefunden:
ZitatuserChromeJS Verwendung ab Firefox 57
userChromeJS-Skripte konnten bis Firefox 57 mit einer Erweiterung geladen werden. Nun muss folgendermaßen vorgegangen werden (am besten alle Dateien per Rechtsklick und "Ziel speichern unter..." runterladen).
Kopiere die 2 Dateien:
1. config.js
2. userChromeJS.jsin den Firefox Installationsordner. Je nach Betriebssystem also
C:\Program Files (x86)\Mozilla Firefox bzw. C:\Program Files\Mozilla FirefoxDiese Datei:
3. config-prefs.js
gehört in den Ordner C:\Program Files (x86)\Mozilla Firefox\defaults\pref bzw.
C:\Program Files\Mozilla Firefox\defaults\prefZum Schluss muss die Datei:
4. userChrome.js
in den Ordner chrome des Firefox-Profilordners, der üblicherweise unter
%appdata%\Mozilla\Firefox\Profiles\xxx.default zu finden ist.Frage: Wo müssen die 3 Dateien, config.js, userChromeJS.js und config-prefs.js bei einem Portable FF hin kopiert werden?
-
Das Skript legt ein Symbol (zwei blaue Pfeile) in der Symbolleiste ab und du kannst damit ebenfalls Firefox neu starten:
Ähm - leider nicht bei mir :cry:
Edit: Es funktioniert noch nichtmal bei einem neuen, völlig cleanen FF Port.
Edit 2: So wie es aussieht, funktionieren alle js-Scrips nicht - nur die userChrome.css (bin ratlos). -
Und das nicht funktionierende Skript hast du auch wirklich im Ordner chrome, mit allen anderen Skripten zusammen?Ja, 100%.
[attachment=0]Zwischenablage01.jpg[/attachment]