- Firefox-Version
- 103.0.2
- Betriebssystem
- Windows 10 64 bit
Hi,
war ja schon länger nimmer hier, aber jetzt hab ich mal wieder Probleme. Ich hab im chrome Ordner mehrere scripte von denen keines mehr funktioniert
RestartFirefoxButton_Movable.uc.js und
RAMBack.uc.js
die Datei config-prefs.js ist im pref Ordner vorhanden
die Datei config.js ist direkt unter Firefox (wo auch die firefox.exe ist) vorhanden
Jetzt die Frage was muss ich wo ändern, dass das wieder geht
Vllt. kann mir da wer helfen
Vielen Dank schon mal
Frank
config.js
Code
// config.js
const Cu = Components.utils;
try {
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/osfile.jsm");
if (!Services.appinfo.inSafeMode) {
let path = OS.Constants.Path.libDir;
if (Services.appinfo.OS == 'Darwin') { // macOS
path = OS.Path.join(OS.Path.dirname(path), "Resources");
};
var ucjsDirPath = OS.Path.join(path, "userChromeJS");
path = OS.Path.join(ucjsDirPath, "main.js");
let mainFileURI = OS.Path.toFileURI(path);
Services.scriptloader.loadSubScript(mainFileURI, this, "UTF-8");
};
} catch(e) {
Cu.reportError(e);
};
Alles anzeigen
config-prefs.js
Code
pref("general.config.obscure_value", 0);
pref("general.config.filename", "config.js");
pref("general.config.sandbox_enabled", false);
RAMBack.uc.js
Code
// RAMBack.uc.js
(function() {
if (location != AppConstants.BROWSER_CHROME_URL)
return;
try {
CustomizableUI.createWidget({
id: 'ramback-button',
defaultArea: CustomizableUI.AREA_NAVBAR,
label: 'Internen Speicher leeren',
tooltiptext: 'Internen Speicher leeren',
onCommand: function() {
onCommand();
}
});
} catch(e) { };
const icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABGdBTUEAAK%2FINwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAOcSURBVHjaYvz%2F%2Fz8DJQAggBgU5OUZeHl5GSQlJRnY2dkZ%2BPj4GLi5uRn4%2Bfmzvb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BWOGZ0%2BfMjx6%2BBCsGRTAX798YRAUFmJQ09Jn4P7BwBDpzMxgIPaMYf32u%2BcAAojp1VeBS9y8fxi%2BbalmMGe7x%2BDvHcAgoaDK8AUYcK9evgQbIK%2BmyaCsZsigzPKWwfrPQQZ1yc8M39ll%2F3358fcIQACx2Mvxqfx49wKYMHgZpE2%2FMDxdsJbBkFOBgc%2FJjeHa1QsMAiJiDPw%2F%2FzJwnd%2FHENlixsDz1oTh%2FY1bDBJSRoxiHMycAAEAQQC%2B%2FwTW2dP95K%2F9AOryJf4T5eoCEvDJADFYEwC7xgkA9h8mAAHs6QBhUxIABd4CAPba0gDsACv%2F3sfq%2FxccxwL9%2Fv4fAgBBAL7%2FAq7H50BmkuSYHxL9%2FQP25QDm9xv%2BGh0JAPDZwQDh5esA8ebcACEY8QD4Cib%2B7ejtACwd9AGktu%2FXT5DXid36%2B4oCiCFOiINBBJgkPYSY6lOlGF4vibL99f9s9P9gdc43QlIKx9V4uK%2FfmG%2F2%2F9Lc6H85EsyvIxRZnrMzMiTCkjJAAIENkAYyOCBc%2BXYbqQuny5X%2F6wswHgcJiDEwqK6LEf%2ByIVXlvzAD0wSIEAIABBDYACkgQxiIuYFYgoFBGpj12pgYGLxB8iDXKTIwBPEyMLQAmeKMaLkZIMAAUM1Z7n%2BaufcAAAAASUVORK5CYII%3D)';
var menuitem = document.createXULElement("menuitem");
menuitem.setAttribute("id", "menu_ramback");
menuitem.setAttribute("label", "Internen Speicher leeren");
menuitem.addEventListener("command", onCommand);
document.getElementById("menu_ToolsPopup").appendChild(menuitem);
function onCommand() {
// since we don't know the order of how things are going to go, fire these multiple times
Services.obs.notifyObservers(null, "memory-pressure", "heap-minimize");
Services.obs.notifyObservers(null, "memory-pressure", "heap-minimize");
Services.obs.notifyObservers(null, "memory-pressure", "heap-minimize");
Services.obs.notifyObservers(null, "dump-mem-stats", "clean up, pig!");
};
})();
Alles anzeigen
RestartFirefoxButton_Movable.uc.js
Code
(function() {
if (location != 'chrome://browser/content/browser.xul' && location != 'chrome://browser/content/browser.xhtml')
return;
try {
CustomizableUI.createWidget({
id: 'restart-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');
toolbaritem.onclick = event => onClick(event);
var props = {
id: 'restart-button',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
label: 'Restart',
tooltiptext: 'Restart (with middle click userChrome.js cache is emptied)',
style: 'list-style-image: url(chrome://browser/skin/sync.svg)'
};
for(var p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
} catch(e) {};
function onClick(event) {
if(event.button == 1)
Services.appinfo.invalidateCachesOnRestart();
else if(event.button == 2)
return;
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
if(!cancelQuit.data)
Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
}
})();
Alles anzeigen