Verstehe. ist aber nicht so tragisch, wenn der eine Eintrag bleibt.
Beiträge von genetic
-
-
: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:
ZitatAlles anzeigenuserChromeJS 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]
-
Okay, dann bin ich komplett ratlos, denn andere Scripte funktionieren.
Sprich an der Ordner-Struktur bzw. userChrome.js liegt es nicht.
-
Prüfe bitte mal, ob bei dir das Skript in der Zeichenkodierung UTF-8 ohne BOM ist. Seit Firefox 66 ist das wichtig.
Geprüft - ist UTF-8 ohne BOM
Macht es ggf. einen Unterschied, wenn es ein FF-Portable ist?
-
Dieses Script fügt keinen Button ein, sondern nur einen Eintrag im Hamburgermenü.
Sonst nichts.
Wenn Du einen Button willst muss Du eines der anderen empfohlenen Scripte verwenden.
Mfg.
EndorJa, so wie in der Animation von Andreas!?
Hatte das Script schon vor ettlichen Monaten installiert - da lief es noch - heute ist mir aufgefallen das es nicht mehr läuft.
-
Im FF66.0.3 funktioniert es definitiv nicht.
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); })();Soll heißen, es erscheint kein Restartbutton.
-
Hallo,
leider funktioniert das oben verlinkte Script^ nicht mehr mit FF66.
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); })();Hat jemand einen Tipp, wie man es umbauen muss?
Vielen Dank.
-
Was ich bei Tab Reloder supoptimal finde, ist dass ich die Auto-Reload-Funktion für jeden Tab neu einstellen muss. Deshalb hat es Tab Relaoder bei mir nicht in die Addonliste geschafft.