//
... vor allem praktisch mit der Windows Explorer - Integration.
Kleiner Hinweis: Ich nutze den Total Commander
//
... vor allem praktisch mit der Windows Explorer - Integration.
Kleiner Hinweis: Ich nutze den Total Commander
Liam Payne, bis 2017 Sänger der Teenie-Band One Direction, starb mit 31 Jahren durch einen Sturz aus dem 3. Stock eines Hotels in Buenos Aires, in dem er vorher offensichtlich unter Drogen- und Alkoholeinfluss randalierte. Bei Eintreffen der Polizei nahmen die Beamten den Aufschlag eines Körpers wahr. Payne war sofort tot.
Schade, wieder ein junger Künstler, der mit dem Ruhm in frühester Jugend offensichtlich nicht umgehen konnte.
Funkster
Wow, nach 17 Monaten wieder aktiv im Thread!? Respekt....
Aber du hast es ja selbst in #4 klargestellt, was sollte ich dazu also noch sagen!?
Discoooooooo
Und heute gabs dann schon das UpDate auf 131.0.2
Sören Hentzschel Ich schick noch einmal einen Genesungswunsch raus!
// aber das Geld für den Mist muss doch erst abgenutzt werden..
BTW: Wenn dem Hersteller des Betriebssystems nicht vertraut wird, sollte man ein anderes nutzen...
Nutz doch mal den o.a. Filter... ich habe jetzt (mit Nightly) die letzten Tage die besagte Webseite mehrmals aufgerufen und nie sah ich irgendwelche Werbung.
Isch abe ga kein extra Antivirensoftware
Vielen Dank, da das hier bei einigen Scripts vorhanden ist, werde ich es lieber gleich ändern. Wäre dann oben z. B. die Zeilen 480 bis 495
so zu ändern?
addEventListener: `
if(event.button == 0) {
AM_Helper.revealPath(this.value);
} else if (event.button == 2){
AM_Helper.copyToClipboard(this.value);
}
return false;`,
}));
}
} else {
row.appendChild($C("label", {
class: "detail-row-value text-link",
crop: "end",
value: value,
href: value,
addEventListener: `
Alles anzeigen
also quasi ein 1 zu 1 Austausch?
Heißt das, das alle onclick Beschreibungen in Scripts in addEventListener umzuschreiben sind?
Siehe z. B. hier: Zeile 480 und 495
// ==UserScript==
// @name AddonsPage.uc.js
// @description Bei about:addons (Add-ons Verwaltung) rechtsklick auf installierte Erweiterung
// @description zum Anzeigen der neu hinzugefügen Kontextmenüeinträge.
// @description Bei Detailseite (klick auf Mehr) wird die Installationsadresse - Pfad, hinzugefügt
// @author ywzhaiqi
// @include main
// @charset utf-8
// @version 2018.06.27
// @downloadURL https://raw.github.com/ywzhaiqi/userChromeJS/master/AddonsPage/AddonsPage.uc.js
// @homepageURL https://github.com/ywzhaiqi/userChromeJS/tree/master/AddonsPage
// @reviewURL http://bbs.kafan.cn/thread-1617407-1-1.html
// @optionsURL about:config?filter=view_source.editor.path
// @note - Rechtsklick bei Add-On, um das Menü anzuzeigen bei (Erweiterungen, Themes, Plug-Ins), und kopieren Sie den Namen.
// @note - Greasemonkey und Scriptish verfügen schon über dieses Menü.
// @note - Bei GM-Skript, Erweiterungen und Themen die Installationsadresse und den Plug-in-Pfad zum Kontextmenü hinzugefügt
// @note - Seite für die Skriptverwaltung wurde hinzugefügt
// @note - Rechtsklickmenü "Add-ons anzeigen" erfordert DOM Inspector, geht nur bis Firefox 56.0.2
// @note - UC-Skript-Verwaltungsschnittstelle
// @note - Aktivieren deaktivieren von Scripten erfordert rebuild_userChrome.uc.xul Script
// @note - Für Editor unter about:config bei view_source.editor.path den Pfad zum Editor eingeben
// @note - Icon Style hinzugefügt,siehe Homepage für Details
// @note - Weitere Informationen finden Sie auf der Homepage
// ==/UserScript==
location == AppConstants.BROWSER_CHROME_URL && (function() {
var iconURL = ""; // uc Symbol für Scriptliste
var Config = {
debug: 0, // 1 = Rechtsklickmenü UC Scriptverwaltung - Menüeinträge anzeigen, 0 = nicht anzeigen
detailView: 1, // Auf Details-Seite Installation-Link hinzufügen
};
if (window.AM_Helper) { // Debuggen ändern, Neuladen ohne Neustart
window.AM_Helper.uninit();
delete window.AM_Helper;
}
if (window.userChromeJSAddon) {
window.userChromeJSAddon.uninit();
delete window.userChromeJSAddon;
}
Cu.import("resource://gre/modules/AddonManager.jsm");
let isCN = false;
try {
isCN = Services.prefs.getCharPref("general.useragent.locale").indexOf("zh") != -1;
} catch (e) {
try {
isCN = Services.prefs.getCharPref("intl.locale.requested").indexOf("zh") != -1;
} catch (e) {
}
}
var ApplyPatchForScript = (function() {
const USO_URL_RE = /(^https?:\/\/userscripts.org.*\/scripts\/source\/\d+)\.\w+\.js$/i;
const GFO_URL_RE_1 = /(^https?:\/\/greasyfork.org\/scripts\/code\/\w+)\.\w+\.js$/i;
const GFO_URL_RE_2 = /(^https?:\/\/greasyfork.org\/scripts\/[^\/]+\/)code[\.\/].*\w+\.js$/i;
// (http://binux.github.io/ThunderLixianExporter/)master/ThunderLixianExporter.user.js
const GITHUB_URL_RE_1 = /(^https?:\/\/\w+.github.io\/\w+\/)master\/.*.*\w+\.js$/i;
// 从 https://raw.githubusercontent.com/ywzhaiqi/userscript/master/noNoticetitleflashOnBBS.user.js
// 转为 https://github.com/ywzhaiqi/userscript/blob/master/noNoticetitleflashOnBBS.user.js
const GITHUB_URL_RE_2 = /(^https?:\/\/raw.githubusercontent.com\/.*?\/master\/.*\.user\.js$)/i;
function getScriptHomeURL(downURL) {
var url;
if (downURL && downURL.startsWith('http')) {
if (USO_URL_RE.test(downURL)) {
url = RegExp.$1.replace(/source/, "show");
} else if (GFO_URL_RE_1.test(downURL)) {
url = RegExp.$1;
} else if (GFO_URL_RE_2.test(downURL)) {
url = RegExp.$1;
} else if (GITHUB_URL_RE_1.test(downURL)) {
url = RegExp.$1;
} else if (GITHUB_URL_RE_2.test(downURL)) {
url = RegExp.$1.replace('raw.githubusercontent.com', 'github.com')
.replace('/master/', '/blob/master/');
}
}
return url ? decodeURIComponent(url) : null;
}
function addHomePage() {
// Scriptish Scripte-Homepage hinzufügen
if (window.Scriptish_config) {
Scriptish_config.scripts.forEach(function(script) {
if(script.homepageURL) return;
var url = script.updateURL || script.downloadURL;
script.homepageURL = getScriptHomeURL(url);
});
}
// Greasemonkey Scripte-Homepage hinzufügen
AddonManager.getAddonsByTypes(['greasemonkey-user-script'], function (aAddons) {
aAddons.forEach(function (aAddon) {
if (aAddon.homepageURL) return;
var url = aAddon._script._downloadURL || aAddon._script._updateURL;
var homepageURL = getScriptHomeURL(url);
if (homepageURL) {
aAddon.homepageURL = homepageURL;
} else {
// console.log(aAddon.name, url);
}
});
});
}
return {
init: addHomePage
}
})();
setTimeout(function() {
ApplyPatchForScript.init();
}, 2000);
window.AM_Helper = {
init: function() {
document.addEventListener("DOMContentLoaded", this, false);
this.platformVersion = parseFloat(Services.appinfo.platformVersion);
},
uninit: function() {
document.removeEventListener("DOMContentLoaded", this, false);
},
handleEvent: function(event) {
switch (event.type) {
case "DOMContentLoaded":
var doc = event.target;
var win = doc.defaultView;
if (["about:addons", "chrome://mozapps/content/extensions/extensions.xhtml"].indexOf(doc.URL) == -1)
return;
this.addPopupMenu(doc);
// Menü-Aufruf
win.AM_Helper = AM_Helper;
this.win = win;
if (Config.detailView) {
var self = this;
var observer = new MutationObserver(function(e) {
e = e[e.length-1];
if (e.attributeName == "loading") {
var doc = e.target.ownerDocument;
self.setUrlOrPath(doc);
}
});
observer.observe(doc.getElementById("detail-view"), {attributes: true});
}
break;
case "popupshowing":
this.getAddon(this.win.document.popupNode.value,
this.setItemsAttributes,
event);
break;
}
},
addPopupMenu: function(doc) {
var ins = doc.getElementById("menuitem_uninstallItem");
if (!ins) return;
ins = ins.nextSibling;
var popup = ins.parentNode;
var menuitem = $C("menuseparator", {
id: "AM-separator-1"
});
popup.insertBefore(menuitem, ins);
menuitem = $C("menuitem", {
id: "AM-inspect-addon",
label: isCN ? "查看附加组件" : "Erweiterung inspizieren",
accesskey: "i",
tooltipText: isCN ? "调用 DOM Inspector 查看 addon 对象" : "Addon mit Dom Inspector inspizieren",
oncommand: "AM_Helper.getAddon(AM_Helper.getPopupNode(this).value, AM_Helper.inspectAddon);"
});
popup.insertBefore(menuitem, ins);
menuitem = $C("menuitem", {
id: "AM-edit-script",
label: isCN ? "编辑" : "Script bearbeiten",
accesskey: "b",
hidden: true,
oncommand: "AM_Helper.getAddon(AM_Helper.getPopupNode(this).value, AM_Helper.editScript);"
});
popup.insertBefore(menuitem, ins);
menuitem = $C("menuitem", {
id: "AM-reload-uc",
hidden: true,
label: isCN ? "重载 uc 脚本(慎用)" : "UC Script neuladen",
style: "font-weight:bold",
tooltiptext: "Nur teilweise Skriptunterstützung. Bei Problemen Firefox Neustarten.",
oncommand: "AM_Helper.getAddon(AM_Helper.getPopupNode(this).value, AM_Helper.reloadUserChromeJS);"
});
popup.insertBefore(menuitem, ins);
menuitem = $C("menuitem", {
id: "AM-browse-dir",
label: isCN ? "查看所在目录" : "Installations-Verzeichnis",
accesskey: "V",
oncommand: "AM_Helper.getAddon(AM_Helper.getPopupNode(this).value, AM_Helper.browseDir);"
});
popup.insertBefore(menuitem, ins);
menuitem = $C("menuitem", {
id: "AM-open-url",
label: isCN ? "打开安装页面" : "Installationsseite öffnen",
accesskey: "s",
tooltiptext: null,
oncommand: "openURL(this.tooltipText)",
});
popup.insertBefore(menuitem, ins);
menuitem = $C("menuitem", {
id: "AM-copy-name",
label: isCN ? "复制名称" : "Namen kopieren",
accesskey: "k",
oncommand: "AM_Helper.getAddon(AM_Helper.getPopupNode(this).value, AM_Helper.copyName);"
});
popup.insertBefore(menuitem, ins);
popup.addEventListener("popupshowing", this, true);
},
setItemsAttributes: function(aAddon, event) {
var popup = event.target;
var doc = popup.ownerDocument;
var
isExtension = (aAddon.type == "extension"),
isTheme = (aAddon.type == "theme"),
isPlugin = (aAddon.type == "plugin"),
isUserStyle = (aAddon.type == "userstyle"),
isScriptish = (aAddon.type == "userscript"),
isGreasemonkey = (aAddon.type == "user-script") || // Greasemonkey
(aAddon.type == "greasemonkey-user-script"), // Greasemonkey 1.7+
isUserScript = isGreasemonkey || isScriptish,
isUserChromeJS = (aAddon.type == "userchromejs"),
isService = (aAddon.type == "service"),
menuitem
;
menuitem = doc.getElementById("AM-browse-dir");
menuitem.hidden = isUserStyle || isUserScript || isService;
menuitem = doc.getElementById("AM-edit-script");
menuitem.hidden = !isUserChromeJS;
menuitem = doc.getElementById("AM-reload-uc");
menuitem.hidden = !Config.debug || !isUserChromeJS;
var className = isGreasemonkey ? "greasemonkey" : "";
// install url
menuitem = doc.getElementById("AM-open-url");
var installURL = isExtension ?
(this.getInstallURL(aAddon) || aAddon.homepageURL) :
(aAddon.homepageURL || this.getInstallURL(aAddon));
menuitem.tooltipText = installURL;
menuitem.hidden = !installURL;
menuitem.className = installURL ? className : '';
menuitem = doc.getElementById("AM-inspect-addon");
menuitem.disabled = !("inspectObject" in window);
menuitem.className = menuitem.disabled ? '' : className;
menuitem = doc.getElementById("AM-copy-name");
menuitem.tooltipText = aAddon.name;
menuitem.className = className;
// if(isUserScript && !isScriptish) {
// var usoURL = "";
// if (aAddon._script) {
// var usDownloadURL = aAddon._script._downloadURL;
// var usUpdateURL = aAddon._script._updateURL;
// if (USO_URL_RE.test(usDownloadURL)) {
// usoURL = usDownloadURL;
// } else if (USO_URL_RE.test(usUpdateURL)) {
// usoURL = usUpdateURL;
// }
// }
// menuitem = doc.getElementById("AM-go-uso");
// menuitem.disabled = !USO_URL_RE.test(usoURL);
// menuitem.className = isUserScript ? menuitem.disabled ? "" : "greasemonkey" : "";
// menuitem.tooltipText = usoURL.replace(/source/, "show")
// .replace(/.\w+.js$/, "");
// menuitem = doc.getElementById("AM-find-uso");
// menuitem.disabled = USO_URL_RE.test(usoURL);
// menuitem.className = isUserScript ? menuitem.disabled ? "" : "greasemonkey" : "";
// menuitem.setAttribute("find-on-uso",
// "https://www.google.com.hk/search?q=site:userscripts.org+inurl:scripts+inurl:show+" +
// encodeURIComponent(aAddon.name));
// }
},
getPopupNode: function (aNode) {
var doc = aNode.ownerDocument;
return "triggerNode" in aNode.parentNode ? aNode.parentNode.triggerNode : doc.popupNode;
},
getAddon: function (aId, aCallback, aEvent) {
var self = this;
if (this.win.gDetailView._addon) {
aCallback.apply(this, [this.win.gDetailView._addon, aEvent]);
return;
}
(self.platformVersion < 61.0?
new Promise((resolve, reject) => AddonManager.getAllAddons(addons => resolve(addons))):
AddonManager.getAllAddons()
).then(addons => {
for (var i = 0; i < addons.length; i++) {
if (addons[i].id == aId) {
aCallback.apply(self, [addons[i], aEvent]);
return;
}
}
});
},
inspectAddon: function (aAddon) {
inspectObject(aAddon);
},
inspectUserscript: function (aAddon) {
inspectObject(aAddon._script);
},
browseDir: function (aAddon) {
switch (aAddon.type) {
case "plugin":
var pathes = aAddon.pluginFullpath;
for (var i = 0; i < pathes.length; i++) {
this.revealPath(pathes[i]);
}
return;
case "userchromejs":
var file = aAddon._script.file;
if (file.exists())
file.reveal();
return;
}
// addon
var gecko = parseInt(Services.appinfo.platformVersion);
var nsLocalFile = Components.Constructor("@mozilla.org/file/local;1", (gecko >= 14) ? "nsIFile" : "nsILocalFile",
"initWithPath");
var dir = Services.dirsvc.get("ProfD", Ci.nsIFile);
dir.append("extensions");
dir.append(aAddon.id);
var fileOrDir = dir.path + (dir.exists() ? "" : ".xpi");
//Application.console.log(fileOrDir);
try {
(new nsLocalFile(fileOrDir)).reveal();
} catch (ex) {
var addonDir = /.xpi$/.test(fileOrDir) ? dir.parent : dir;
try {
if (addonDir.exists()) {
addonDir.launch();
}
} catch (ex) {
var uri = Services.io.newFileURI(addonDir);
var protSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"].
getService(Ci.nsIExternalProtocolService);
protSvc.loadUrl(uri);
}
}
},
editScript: function(aAddon) {
if (aAddon.type == "userchromejs") {
var path = aAddon._script.file.path;
this.launchEditor(path);
}
},
reloadUserChromeJS: function (aAddon) {
if (aAddon.type != "userchromejs") return;
var result = confirm("Neu laden, sicher?\n Mit Vorsicht verwenden, es wird nur von einigen Skripten unterstützt.\n Nicht unterstützte Skripte können Probleme beim Hinzufügen von Schaltflächen,\n Menüs oder Ereignissen haben.\n Bei Problemen, Firefox neu starten.");
if (!result) return;
var script = aAddon._script;
Services.obs.notifyObservers(null, "startupcache-invalidate", "");
Services.scriptloader.loadSubScript(script.url, {}, script.charset || "utf-8");
},
launchEditor: function(path){
var editor = Services.prefs.getCharPref("view_source.editor.path");
if (!editor) {
toOpenWindowByType('pref:pref', 'about:config?filter=view_source.editor.path');
return;
}
var UI = Cc['@mozilla.org/intl/scriptableunicodeconverter'].createInstance(Ci.nsIScriptableUnicodeConverter);
var platform = window.navigator.platform.toLowerCase();
UI.charset = platform.indexOf('win') > -1 ? 'GB2312' : 'UTF-8';
path = UI.ConvertFromUnicode(path);
var appfile = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
appfile.initWithPath(editor);
var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
process.init(appfile);
process.run(false, [path], 1, {});
},
copyName: function (aAddon) {
this.copyToClipboard(aAddon.name);
},
getInstallURL: function(aAddon) {
aAddon = aAddon || this.win.gViewController.viewObjects.detail._addon;
if (!aAddon) return null;
var url = null;
switch (aAddon.type) {
case "extension":
case "theme":
url = (aAddon.contributionURL || aAddon.reviewURL) || null;
return url && url.replace(/\/developers|\/reviews/g, "") || aAddon.creator.url;
case "greasemonkey-user-script":
return aAddon._script._downloadURL || aAddon._script._updateURL;
case "userscript":
url = aAddon._downloadURL || aAddon._updateURL;
return url;
case "userchromejs":
return aAddon.homepageURL || aAddon.reviewURL || aAddon.downloadURL || aAddon.updateURL;
default:
return aAddon.homepageURL;
}
},
get getPath() {
var url = this.win.gViewController.viewObjects.detail._addon;
if (!url) return false;
return url.pluginFullpath || false;
},
setUrlOrPath :function(doc) {
var installURL = this.getInstallURL();
if (!installURL && !this.getPath) return;
if (!doc.getElementById("detail-InstallURL-row")) {
var value = "", label = "";
if (this.win.gViewController.currentViewId.indexOf("detail") != -1) {
var aAddon = this.win.gViewController.viewObjects.detail._addon;
switch (aAddon.type) {
case "extension":
case "theme":
case "greasemonkey-user-script":
value = installURL;
label = isCN? "安装页面": "Installationseite";
break;
case "plugin":
value = this.getPath;
label = isCN? "路径": "Pfad";
break;
}
}
if (!!value && !!label) {
const row = $C("row", {
id: "detail-InstallURL-row",
class: "detail-row-complex",
label: label,
});
row.appendChild($C("label", {
class: "detail-row-label",
value: label,
}));
if (typeof(value) != "string") {
const vbox = row.appendChild($C("vbox"));
for (var i=0;i< value.length;i++) {
vbox.appendChild($C("label", {
class: "detail-row-value text-link",
crop: "end",
value: value[i],
href: value[i],
onclick: `
if(event.button == 0) {
AM_Helper.revealPath(this.value);
} else if (event.button == 2){
AM_Helper.copyToClipboard(this.value);
}
return false;`,
}));
}
} else {
row.appendChild($C("label", {
class: "detail-row-value text-link",
crop: "end",
value: value,
href: value,
onclick: `
if(event.button == 2){
AM_Helper.copyToClipboard(this.value);
return false;
}`,
}));
}
doc.getElementById("detail-rows").appendChild(row);
}
}
},
revealPath: function(path) {
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
file.initWithPath(path);
if (file.exists())
file.reveal();
},
copyToClipboard: function (aString) {
Cc["@mozilla.org/widget/clipboardhelper;1"].
getService(Ci.nsIClipboardHelper).copyString(aString);
}
};
window.userChromeJSAddon = {
scripts: [],
unloads: [],
init: function() {
if ('userchromejs' in AddonManager.addonTypes) return;
this.initScripts();
this.registerProvider();
this.addStyle();
},
uninit: function() {
this.unloads.forEach(function(func) { func(); });
},
initScripts: function() {
var scripts = window.userChrome_js.scripts.concat(window.userChrome_js.overlays);
var self = this;
scripts.forEach(function(script, i) {
self.scripts[i] = new ScriptAddon(script);
});
},
getScriptById: function(aId) {
for (var i = 0; i < this.scripts.length; i++) {
if (this.scripts[i].id == aId)
return this.scripts[i];
}
return null;
},
registerProvider: function() {
var types = null;
if (AddonManagerPrivate.AddonType) {
types = [new AddonManagerPrivate.AddonType(
"userchromejs",
"",
isCN ? "uc 脚本" : "userChrome JS",
AddonManager.VIEW_TYPE_LIST,
9000)];
}
const provider = {
getAddonByID: function(aId, aCallback) {
let script = userChromeJSAddon.getScriptById(aId);
if (aCallback)
aCallback(script);
else
return Promise.resolve(script); // Fx61.0-
},
getAddonsByTypes: function(aTypes, aCallback) {
if (aTypes && aTypes.indexOf("userchromejs") < 0) {
if (aCallback)
aCallback([]);
else
return Promise.resolve([]);
} else {
if (aCallback)
aCallback(userChromeJSAddon.scripts);
else
return Promise.resolve(userChromeJSAddon.scripts);
}
}
};
AddonManagerPrivate.registerProvider(provider, types);
this.unloads.push(function() {
AddonManagerPrivate.unregisterProvider(provider);
});
},
addStyle: function() {
let data = '@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);\
\
@-moz-document url("about:addons"), url("chrome://mozapps/content/extensions/extensions.xhtml") {\
#category-userchromejs > .category-icon {\
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAamSURBVEhLPVZpUJVVGP6AkAuyL7IEsckijAgSqZnplDpWFjVOoWNjaNNMigpmJtsFbWrGcRwVy7Zxwcom+2EzWbIvskeuiMrl7h+X6wUUTRERl6fnHLAf75xzvnvP87zPu32f4uPjg5CQEERGRiIhIQEHDhyAxWqBrb8fvfpeXLhwAbNmzUJsbCxCQqPg7e2P3UVhQL8XYHcG+pzwRHXieWI/blTwgDbaO7Eqvr6+CA0NRVRUlCTYvXs3HA4HjEYjenp60NXVhdS0NEnwXGQ8fH2DsKswEKMGVwl4n0DCYCOBlWc9933OuDf5TPHz80NQUBAiIiIwY8YMlJWVYXBwECaTCdeuXcPZs2elAuFASGgk/HwDsOPTGIypM3FbF4l7pjiMGOIwfC2a51g87IuhGvdJVS4TBGFhYZg+fTqSk5OxZ88eDAwMwGAwQNfbiytXrmDmzJny9/DwCIiQlmpz4LCdwe2hNtwabMOQvQl2tRGquRUjN07gX104HlsUPDRPhuipgqSkJOzduxdWqxV9fX3o7u7GxYsXkZ6eLhWIUPr5+6OoeCdU2zBM5kHYr9+B2ToEg2kIVts4hocu4o4+DqACES7FnxeEAhFjoWD//v2SQIRITxVXr179X4FwQigoLtZCVW3Mk5kEAzBbVFhVO4vCgeHBDoxZEmTSxwwkEBeeJlmACAWqqkpwkeTOf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Zg0zG3nDuHHoZHh1nll6nQxcn72V2/hW+pK5evixXRcxssKVHjHFobjyOP/7sRF39PwSesEomvbKqGXmr1iCN4MsI/ibXt0j27bp1OJqzAeVcT7HZqrdsQcX69WjZtAkdOTn4m3tFDCQwDyOGCLQ3lKCh9hia6g/JcP3dUo6WM4dwruNnaNetwCwCL1acJHgm9ytpG1hZ20laxqR/Q1XHuf7Bbm/19EQ7z1LBKF8MT1QN8/AsRk3xMlx3eids1ByNu4YEHMyLxWzFBa86ueJ1Aq8i6Ie0XJLt4Pkrgh0l+C9suEraeRJcEgQiB2Jui/Uh1YgxK0ctvwhE6MZFCO1T8QMbMo0ES5w1sg9EJ68WCmha7vcQ9Hv2xU/0/hStgwQdXJVH7IP7JBChEnuhSLzqxCeH/FLgp8ljqwcJgpHh7EYFbpJgJRvtAwILghKu++htORvuNw7Pvwjcyf15T0/8BxKwaUMvdQeUAAAAAElFTkSuQmCC);\
}\
}';
let styleService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
let styleURI = Services.io.newURI("data:text/css," + encodeURIComponent(data), null, null);
styleService.loadAndRegisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET);
this.unloads.push(function() {
styleService.unregisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET);
});
},
};
function ScriptAddon(aScript) {
this._script = aScript;
this.id = this._script.url;
this.name = this._script.filename;
this.description = this._script.description;
this.enabled = !userChrome_js.scriptDisable[this.name];
// Änderung - Anpassung für userChrome.js
this.version = this._script.version || null;
this.author = this._script.author || null;
this.homepageURL = this._script.homepageURL || null;
this.reviewURL = this._script.reviewURL || null;
this.reviewCount = 0;
this.fullDescription = this._script.fullDescription || null;
this.downloadURL = this._script.downloadURL || null;
this.iconURL = iconURL;
}
ScriptAddon.prototype = {
version: null,
type: "userchromejs",
isCompatible: true,
blocklistState: 0,
appDisabled: false,
scope: AddonManager.SCOPE_PROFILE,
name: null,
creator: null,
pendingOperations: AddonManager.PENDING_NONE, // Muss neu gestartet werden, sonst werden alle angezeigt
operationsRequiringRestart: 6,
// operationsRequiringRestart: AddonManager.OP_NEEDS_RESTART_DISABLE,
get optionsURL() {
if (this.isActive && this._script.optionsURL)
return this._script.optionsURL;
},
get isActive() {
return !this.userDisabled? true: false;
},
get userDisabled() {
return !this.enabled? true: false;
},
set userDisabled(val) {
if (val == this.userDisabled) {
return val;
}
AddonManagerPrivate.callAddonListeners(val ? 'onEnabling' : 'onDisabling', this, false);
if (this.pendingOperations == AddonManager.PENDING_NONE) {
this.pendingOperations = val ? AddonManager.PENDING_DISABLE : AddonManager.PENDING_ENABLE;
} else {
this.pendingOperations = AddonManager.PENDING_NONE;
}
this.enabled = !val;
if (window.userChromejs) {
userChromejs.chgScriptStat(this.name);
}
AddonManagerPrivate.callAddonListeners(val ? 'onEnabled' : 'onDisabled', this);
},
get permissions() {
// var perms = AddonManager.PERM_CAN_UNINSTALL;
// perms |= this.userDisabled ? AddonManager.PERM_CAN_ENABLE : AddonManager.PERM_CAN_DISABLE;
var perms = this.userDisabled ? AddonManager.PERM_CAN_ENABLE : AddonManager.PERM_CAN_DISABLE;
// if (this.updateURL) perms |= AddonManager.PERM_CAN_UPGRADE;
return perms;
},
uninstall: function() {
AddonManagerPrivate.callAddonListeners("onUninstalling", this, false);
this.needsUninstall = true;
this.pendingOperations |= AddonManager.PENDING_UNINSTALL;
AddonManagerPrivate.callAddonListeners("onUninstalled", this);
},
cancelUninstall: function() {
this.needsUninstall = false;
this.pendingOperations ^= AddonManager.PENDING_UNINSTALL;
AddonManagerPrivate.callAddonListeners("onOperationCancelled", this);
},
// Fx62.0-
enable: function() {
this.userDisabled = false;
},
disable: function() {
this.userDisabled = true;
}
};
AM_Helper.init();
userChromeJSAddon.init();
function $C(name, attr) {
var el = document.createXULElement(name);
if (attr) Object.keys(attr).forEach(function(n){ el.setAttribute(n, attr[n])});
return el;
}
})();
Alles anzeigen
Bei Benutzerskripten reicht der normale Neustart von Firefox nicht. Beim Neustart muss zusätzlich der Skript-Cache geleert werden. Wenn du kein Neustart-Skript hast, mit dem man das mit Rechtsklick auf das entsprechende Symbol machen kann...
Hier mal ein Restart-Script, das das Geschilderte beherrscht:
// Restart button script for Firefox 60+ by Aris
//
// left-click on restart button: normal restart
// middle-click on restart button: restart + clear caches
// right-click on restart button: restart + clear caches
//
// based on 'Quit' button code by 2002Andreas
// restart code from Classic Theme Restorer add-on
// invalidate caches from Session Saver add-on
(function() {
try {
// ChromeUtils.importESModule("resource:///modules/CustomizableUI.sys.mjs");
var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService);
var appversion = parseInt(Services.appinfo.version);
var button_label = "Restart";
CustomizableUI.createWidget({
id: "uc-restart", // button id
defaultArea: CustomizableUI.AREA_NAVBAR,
removable: true,
label: button_label, // button title
tooltiptext: button_label, // tooltip title
onClick: function(event) {
var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].createInstance(Components.interfaces.nsISupportsPRBool);
var observerSvc = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
if(event.button=='1') { // middle-click - clear caches
Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).invalidateCachesOnRestart();
}
if(event.button=='0' || event.button=='2') { // left-click - restart/right-click - clear caches
observerSvc.notifyObservers(cancelQuit, "quit-application-requested", "restart");
if(cancelQuit.data) return false;
Services.startup.quit(Services.startup.eRestart | Services.startup.eAttemptQuit);
}
},
onCreated: function(button) {
return button;
}
});
var icon = "chrome://global/skin/icons/reload.svg";
if(appversion < 92) icon = "chrome://browser/skin/reload.svg";
// style button icon
var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent('\
\
#uc-restart .toolbarbutton-icon {\
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgS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yvr9wl62NHJbtJeDzOo17YmprVzWOppLO2RRNwf1FSOzSUAXsCIR4QdP13UPfjhUde2mjuBXUjcXNEabOnJmq7Y4Nd7z1fu%2BJ%2FR2Jpgrm0jauAI8GlnSlBi4I0bO6sLBWHc9esxRdmjOZf5n%2B5CLWzCzOvsbKupBZ1xgmElUoC%2BgoKtRGQfNomoaND8P8XS%2Bby1olO7O6GHTl1DejGDOrNB%2BvpO7I%2Ba31%2FDP9Z28YUmqoqhCKcG2EYD6ZMUTojZ8WHmsqD%2BI6wnWFajugCkuuZaV%2FZS47wp99R7E3LbxPV6rtr7dV1pmyuBWs3hr7dZ380LC2tzseffvUHm86C1JC2A%2FrGcn509cn%2BPvTk9ibc1R06qL91Ms1CadF000ll9rVS2VykLzVr0lHOgtpuJ9yUFyXxqhKZjbH2nJRI9IZwyw2kXjvXV%2FIOWgaBcc2a%2BtjdVXR1J3iBDx8QUpQUJAuJJclseogxz441H5vrPO72cm0VSyVPJq27ZaHm8ST3Y0M9d9Kkr19A1A1x4VIObTGBfNrsJ5XmE9b6KqgvrOGhr1Vns2sgeNIkXiigvHf1liZuHWZYjINSEXRVLewZjN6bYmYbvN4rcDvVzFKLnOpErMLBpvbklClznyyyPDA6DjTX3wJWICr%2Bnb3ffjXSGpl5Nxnn88uh2ORUCBaHfVQU%2BsjVuGhKqJT5lFYShr8fGH4j42bH53EnJ4EtgEEPQOTzHx9mqXLl9AT9TS82RvreOmVcMTXVh4JhIr5kp3LFu6u3Lk%2ByMylQazU3ENYAvw3AFUTimFqj5i7AAAAAElFTkSuQmCC"); \
\
}\
\
'), null, null);
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
} catch (e) {
Components.utils.reportError(e);
};
})();
Alles anzeigen