etjim
火狐狸
火狐狸
  • UID30046
  • 注册日期2009-08-12
  • 最后登录2019-10-18
  • 发帖数142
  • 经验205枚
  • 威望0点
  • 贡献值46点
  • 好评度8点
  • 忠实会员
  • 社区居民
30楼#
发布于:2019-05-22 17:13
333ywb:还有最后要改的脚本,改了以后,还是不起作用,再麻烦看看,万谢!
// ==UserScript==
// @name           rebuild_userChrome.uc.js

// @namespace      http://...
回到原帖
这个脚本alice也更新了

https://github.com/alice0775/userChrome.js/blob/master/rebuild_userChrome.uc.js
下载下了,只需将一些日文改为中文
lonely_8
狐狸大王
狐狸大王
  • UID30273
  • 注册日期2009-09-03
  • 最后登录2019-10-15
  • 发帖数485
  • 经验247枚
  • 威望0点
  • 贡献值72点
  • 好评度75点
  • 社区居民
  • 忠实会员
31楼#
发布于:2019-05-22 17:40
333ywb:还有最后要改的脚本,改了以后,还是不起作用,再麻烦看看,万谢!
// ==UserScript==
// @name           rebuild_userChrome.uc.js
// @namespace      http://...
回到原帖
这个脚本的功能是不是在菜单工具栏中(按alt出现的)的“工具”增加了一个管理菜单项?
你提供的修改过后的脚本我这里测试没有失效啊。
具体是怎样的“不起作用”?

有可能是由于其它的脚本修改了“工具”菜单下拉项导致的“排版空白”异常,
具体可以二分法排查一下同样在这个菜单创建或者修改菜单项的脚本,
这些脚本都可以通过顶楼修改建议2:
"document.createElement"改为"document.createXULElement"修复这种异常。
又或者试试看 30 楼的建议。
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-10-15
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
32楼#
发布于:2019-05-22 18:04
lonely_8:这个脚本的功能是不是在菜单工具栏中(按alt出现的)的“工具”增加了一个管理菜单项?
你提供的修改过后的脚本我这里测试没有失效啊。
具体是怎样的“不起作用”?

有可能是由于其它的脚本修改了“工具”菜单下拉项导致的“排版空白”异常,...
回到原帖
对的就是在菜单中点工具可以显示,30楼的部分功能可以使用,但是排版乱了跟以前在67版中不一样。
按照1楼方法自己修改以前的,显示不出来
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-10-15
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
33楼#
发布于:2019-05-22 18:20
lonely_8:这个脚本的功能是不是在菜单工具栏中(按alt出现的)的“工具”增加了一个管理菜单项?
你提供的修改过后的脚本我这里测试没有失效啊。
具体是怎样的“不起作用”?

有可能是由于其它的脚本修改了“工具”菜单下拉项导致的“排版空白”异常,...
回到原帖
修改document.createElement后可以用了,原来这个脚本是放在SubScript文件夹

现在我放在xul文件夹下就可以用了。


但是有个小小的问题就是,在69版下如图:在【自定义菜单】中,点击,【左键:重载配置】后,
不出现第2张图中【配置已经重新载入】这个小提示了,这个怎么解决?






图片:快照2.jpg








图片:快照3.jpg

lonely_8
狐狸大王
狐狸大王
  • UID30273
  • 注册日期2009-09-03
  • 最后登录2019-10-15
  • 发帖数485
  • 经验247枚
  • 威望0点
  • 贡献值72点
  • 好评度75点
  • 社区居民
  • 忠实会员
34楼#
发布于:2019-05-22 18:30
333ywb:修改document.createElement后可以用了,原来这个脚本是放在SubScript文件夹

现在我放在xul文件夹下就可以用了。


但是有个小小的问题就是,在69版下如图:在【自定义菜单】中,点击,【左键:重载配置】后,
不...
回到原帖
“用户脚本设置”中的菜单项是其它的脚本往这个菜单中添加的吧。
图二弹窗的标题可以看出是可能是有关 “addMenu”脚本中创建的,
有可能这个脚本失效了。
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-10-15
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
35楼#
发布于:2019-05-22 18:46
lonely_8:“用户脚本设置”中的菜单项是其它的脚本往这个菜单中添加的吧。
图二弹窗的标题可以看出是可能是有关 “addMenu”脚本中创建的,
有可能这个脚本失效了。
回到原帖
我也搞不懂了,不知道关联的是那个脚本,一共就两个addmenu脚本:
一个在chrome文件夹下:addmenu.uc
一个在chrome\local文件夹下:_addmenu.uc
搜索【左键:重载配置】和【配置已经重新载入】相关文字也搜索不到
lonely_8
狐狸大王
狐狸大王
  • UID30273
  • 注册日期2009-09-03
  • 最后登录2019-10-15
  • 发帖数485
  • 经验247枚
  • 威望0点
  • 贡献值72点
  • 好评度75点
  • 社区居民
  • 忠实会员
36楼#
发布于:2019-05-22 18:58
333ywb:我也搞不懂了,不知道关联的是那个脚本,一共就两个addmenu脚本:
一个在chrome文件夹下:addmenu.uc
一个在chrome\local文件夹下:_addmenu.uc
搜索【左键:重载配置】和【配置已经重新载入】相关文字也搜...
回到原帖
1、二分法能快速排查问题脚本:
先将一部分脚本移动到配置外的其它目录,如果问题消失,
则问题脚本在这些脚本中,否则在另外的一部分脚本中。
重复这个步骤直到确定出问题脚本。

2、如果你是win10系统,Nightly 默认是使用系统通知的
需要在系统通知权限中给与 Nightly 通知权限。
或者将系统通知改成 FF 自身的通知。about:config中设置 alerts.useSystemBackend 为 false。
etjim
火狐狸
火狐狸
  • UID30046
  • 注册日期2009-08-12
  • 最后登录2019-10-18
  • 发帖数142
  • 经验205枚
  • 威望0点
  • 贡献值46点
  • 好评度8点
  • 忠实会员
  • 社区居民
37楼#
发布于:2019-05-22 19:35
你好楼主,请问这个脚本在FF68上出现如下情况,请问要如何修改?

图片:捕获.PNG


脚本如下:
// ==UserScript==
// @name         AddonsPage.uc.js
// @description  附件组件页面右键新增查看所在目录,详细信息页面新增安装地址或路径,UC脚本管理页面。
// @author       ywzhaiqi
// @include      main
// @charset      utf-8
// @version      2018.3.13
// @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         - 附件组件页面右键新增查看所在目录(支持扩展、主题、插件)、复制名字。Greasemonkey、Scriptish 自带已经存在
// @note         - 附件组件详细信息页面新增GM脚本、扩展、主题安装地址和插件路径,右键即复制
// @note         其它信息见主页
// ==/UserScript==
 
location == "chrome://browser/content/browser.xul" && (function () {
 
    var iconURL = "";  // uc Symbol für Scriptliste
 
    var Config = {
        debug: 1,  // 1 则uc管理界面右键菜单会有 "重载 uc 脚本" 的菜单
        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/Services.jsm");
    Cu.import("resource://gre/modules/AddonManager.jsm");
 
    var isCN = true;
    try{
        isCN = Services.prefs.getCharPref("general.useragent.locale","zh-CN").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 Skripte-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 Skripte-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);
        },
        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.xul"].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":
                    if(this.win.document.popupNode){
                        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 Script neuladen",
                style: "font-weight:bold",
                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 || !aAddon.enabled;
            if(Config.debug && isUserChromeJS && aAddon.hasError ){
                menuitem.hidden = false;
            }
            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;
 
        },
 
        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;
            }
 
            let allAddonsPromise =  AddonManager.getAllAddons(function (aAddons) {
                for (var i = 0; i < aAddons.length; i++) {
                    if (aAddons[i].id == aId) {
                        aCallback.apply(self, [aAddons[i], aEvent]);
                        return;
                    }
                }
            });
            if(allAddonsPromise){
                allAddonsPromise.then(function(aAddons){
                    for (var i = 0; i < aAddons.length; i++) {
                        if (aAddons[i].id == aId) {
                            aCallback.apply(self, [aAddons[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("是否重新加载脚本(需要脚本支持重载)?\n");
            if (!result) return;
 
            window.userChromeJSAddon.reloadScript(aAddon);
 
        },
        launchEditor: function (path) {
                var editor;
                try{
                    editor = Services.prefs.getCharPref("view_source.editor.path","");
                }catch(e){
                }
             
            if (!editor) {
                var appfile = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
                appfile.initWithPath(path);
                let spWin = window.openDialog("chrome://devtools/content/scratchpad/index.xul", "Toolkit:Scratchpad", "chrome,dialog,centerscreen,dependent,width=1024,height=600");
                spWin.top.moveTo(0, 0);
                spWin.top.resizeTo(screen.availWidth, screen.availHeight);
                spWin.addEventListener("load", function spWinLoaded() {
                    spWin.removeEventListener("load", spWinLoaded, false);
                    let Scratchpad = spWin.Scratchpad;
                    Scratchpad.setFilename(appfile.path);
                    Scratchpad.addObserver({
                        onReady: function () {
                            Scratchpad.removeObserver(this);
                            Scratchpad.importFromFile.call(Scratchpad, appfile);
                        }
                    });
                }, false);
            } else {
                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 = "%Installations-Seite%";
                            break;
                        case "plugin":
                            value = this.getPath;
                            label = "%Pfad%";
                            break;
                    }
                }
                if (!!value && !!label) {
                    var xul = "";
                    if (typeof(value) != "string") {
                        xul = "<vbox>";
                        for (var i = 0; i < value.length; i++) {
                            xul += ('<label class="detail-row-value text-link" crop="end" onclick="\
                                if(event.button == 0) { \
                                    AM_Helper.revealPath(this.value); \
                                } else if (event.button == 2){ \
                                    AM_Helper.copyToClipboard(this.value); \
                                } \
                                return false;" \
                                value="' + value[i] + '" href="' + value[i] + '"/>');
                        }
                        xul += "</vbox>";
                    } else {
                        xul = '<label class="detail-row-value text-link" crop="end" onclick="\
                            if(event.button == 2){\
                                AM_Helper.copyToClipboard(this.value); \
                                return false;\
                            }" value="' + value + '" href="' + value + '"/>';
                    }
                    xul = '<row class="detail-row-complex" id="detail-InstallURL-row" label="' + label + '">' +
                        '<label class="detail-row-label" value="' + label + '"/>' + xul + '</row>';
                    if (isCN) {
                        xul = xul.replace(/\%Installpage\%/g, "Installations-Seite").replace(/\%Path\%/g, "Pfad");
                    } else {
                        xul = xul.replace(/\%/g, "");
                    }
                    // doc.getElementById("detail-rows").innerHTML += xul;
                    doc.getElementById("detail-rows").appendChild(doc.createElement("row")).outerHTML = xul;
                }
            }
        },
        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);
            });
        },
        reloadScript: function (aAddon) {
             
            var script = aAddon._script;
            if(window.userChrome_js && window.userChrome_js.reloadScript){
                let newscript = window.userChrome_js.reloadScript(script.filename);
                if(newscript){
                    for (var i = 0; i < this.scripts.length; i++) {
                        if (this.scripts[i].id == aAddon.id) {
                            this.scripts[i] = new ScriptAddon(newscript);
                            return;
                        }
                    }
                }
            }else{
                Services.obs.notifyObservers(null, "startupcache-invalidate", "");
                Services.scriptloader.loadSubScript(script.url, {}, script.charset || "utf-8");
            }
        },
        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)];
            }
 
            let provider = {
                getAddonByID: function (aId, aCallback) {
                    let script = userChromeJSAddon.getScriptById(aId);
                    if(aCallback){
                        aCallback(script);
                    }else{
                        return script;
                    }
                },
 
                getAddonsByTypes: function (aTypes, aCallback) {
                     
                    if (aTypes && aTypes.indexOf("userchromejs") < 0) {
                        if(aCallback){
                            aCallback([]);
                        }else{
                            return [];
                        }
                    } else {
                        if(aCallback){
                            aCallback(userChromeJSAddon.scripts);
                        }else{
                            return 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.xul") {\
                    #category-userchromejs > .category-icon {\
                        list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAamSURBVEhLPVZpUJVVGP6AkAuyL7IEsckijAgSqZnplDpWFjVOoWNjaNNMigpmJtsFbWrGcRwVy7Zxwcom+2EzWbIvskeuiMrl7h+X6wUUTRERl6fnHLAf75xzvnvP87zPu32f4uPjg5CQEERGRiIhIQEHDhyAxWqBrb8fvfpeXLhwAbNmzUJsbCxCQqPg7e2P3UVhQL8XYHcG+pzwRHXieWI/blTwgDbaO7Eqvr6+CA0NRVRUlCTYvXs3HA4HjEYjenp60NXVhdS0NEnwXGQ8fH2DsKswEKMGVwl4n0DCYCOBlWc9933OuDf5TPHz80NQUBAiIiIwY8YMlJWVYXBwECaTCdeuXcPZs2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VUCZhL8XYKs9vDAOoJuY+K/DAjAPobxa46e49z/TqviWREz47FV4aAKx5m673DqzwacPl2FisoKEtWgsakJdXV12L5mDVII/grtDdoKhmOM1XODjXab6ziraUy14jGr6wF7Y4Qlfo+mCHBcd8Gtnii0njmMmtp21FBBRUWFVFFL8NraWmx7/32kE1goWM7QZAX4o58A1iHOIPaNhf1g476HzWm0s3T5TMdGVOSLggT/6qLR2XYM9Q2dBK6R4NXV1aisrkITVRSuXYvUSYKltFXTgtDPaWsisJneW2g9VNPNZ0aqMPHcxb0i3jywOVFBNDpajhGwnSFpopJ6afWNTWhuakF+9lpk0HMRoreZg0zG3nDuHHoZHh1nll6nQxcn72V2/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 AddonAuthor(aName, aURL) {
        this.name = aName;
        this.url = aURL;
    }
    AddonAuthor.prototype = {
        name: null,
        url: null,
        // Returns the author's name, defaulting to the empty string
        toString() {
            return this.name || "";
        }
    };
    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];
 
        this.version = this._script.version || null;
        this.creator = this._script.author? new AddonAuthor(this._script.author,this._script.namespace):"";
        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.optionsURL = this._script.optionsURL || null;
        this.iconURL = this._script.iconURL || iconURL;
        this.updateDate = new Date(this._script.lastModifiedTime);
        this.hasError = false;
        if(typeof this._script.haserror !="undefined"){
            this.hasError = this._script.haserror;
        }
        if(this.hasError){
            this.enabled = false;
            this.name = this.name + "(脚本运行错误)";
        }
    }
 
    ScriptAddon.prototype = {
        version: null,
        type: "userchromejs",
        isCompatible: true,
        blocklistState: 0,
        scope: AddonManager.SCOPE_PROFILE,
        name: null,
        creator: null,
        pendingOperations: AddonManager.PENDING_NONE,  // 必须,否则所有都显示 restart
        get operationsRequiringRestart(){
            return AddonManager.OP_NEEDS_RESTART_NONE
        },
        get optionsURL() {
            if (this.isActive && this._script.optionsURL){
                return this._script.optionsURL;
            }
        },
        get isActive() {
            return !this.userDisabled;
        },
        get userDisabled() {
            return !this.enabled;
        },
        disable:function(){
            this.userDisabled = true;
        },
        enable:function(){
            this.userDisabled = false;
        },
        set userDisabled(val) {
            if (val == this.userDisabled) {
                return val;
            }
 
            AddonManagerPrivate.callAddonListeners(val ? 'onEnabling' : 'onDisabling', this, false);
            var needRunMethod = false;
            if(val){//disabled
                //有 shutdown 方法或者需要重启生效的,直接禁用
                if(this._script.shutdown||this.pendingOperations == AddonManager.PENDING_ENABLE){
                    //非重启生效的,需要运行shutdown方法
                    needRunMethod = this.pendingOperations == AddonManager.PENDING_NONE;
                    this.pendingOperations = AddonManager.PENDING_NONE;
                }else{
                    this.pendingOperations = AddonManager.PENDING_DISABLE;
                }
            }else {
                //有 startup 方法或者需要重启失效的,直接启用
                if(this._script.startup || this.pendingOperations == AddonManager.PENDING_DISABLE){
                    //非重启失效的,需要运行 startup 方法
                    needRunMethod = this.pendingOperations == AddonManager.PENDING_NONE;
                    this.pendingOperations = AddonManager.PENDING_NONE;
                }else{
                    this.pendingOperations = AddonManager.PENDING_ENABLE;
                }
            }
            this.enabled = !val;
            if (window.userChrome_js && window.userChrome_js.chgScriptStat) {
                window.userChrome_js.chgScriptStat(this.name,needRunMethod);
            }
 
            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;
            if(this.hasError){
                perms = "";
            }else{
                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);
        },
    };
    AM_Helper.init();
    //延迟初始化,保证其他脚本已加载
    setTimeout(function () {
        if(window.userChrome_js){
            userChromeJSAddon.init();
        }
    },1000);
 
    function $C(name, attr) {
        var el = document.createElement(name);
        if (attr) Object.keys(attr).forEach(function (n) {
            el.setAttribute(n, attr[n])
        });
        return el;
    }
})();
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-10-15
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
38楼#
发布于:2019-05-22 21:00
lonely_8:1、二分法能快速排查问题脚本:
先将一部分脚本移动到配置外的其它目录,如果问题消失,
则问题脚本在这些脚本中,否则在另外的一部分脚本中。
重复这个步骤直到确定出问题脚本。

2、如果你是win10系统,Nightly 默认是使用系统通知的
...
回到原帖
只有这一个小小的问题了,先不折腾了。基本上我自己用的脚本都能在69下正常了,先这样用了
真的是非常感谢你了,一下午时间一直帮助我解决问题。
而且从去年开始我就一直请教你关于UC脚本出现的各种问题,
都是你耐心和热心的帮我解决的,真的是非常非常的感谢!
lonely_8
狐狸大王
狐狸大王
  • UID30273
  • 注册日期2009-09-03
  • 最后登录2019-10-15
  • 发帖数485
  • 经验247枚
  • 威望0点
  • 贡献值72点
  • 好评度75点
  • 社区居民
  • 忠实会员
39楼#
发布于:2019-05-23 12:36
etjim:你好楼主,请问这个脚本在FF68上出现如下情况,请问要如何修改?

脚本如下:
// ==UserScript==
// @name         AddonsPage.uc.js
// @description  附件组件页面...
回到原帖
location == "chrome://browser/content/browser.xul"
//改为
location.href.startsWith('chrome://browser/content/browser.x')
//163-218行之间,所有的
            });
            popup.insertBefore(menuitem, ins);
//改为
            }, doc);
            popup.insertBefore(menuitem, ins);
//750-751 行改为
    function $C(name, attr, doc) {
        var el = (doc || document).createXULElement(name);


以上修改应该向下兼容的(没具体测试最低兼容版本)。
etjim
火狐狸
火狐狸
  • UID30046
  • 注册日期2009-08-12
  • 最后登录2019-10-18
  • 发帖数142
  • 经验205枚
  • 威望0点
  • 贡献值46点
  • 好评度8点
  • 忠实会员
  • 社区居民
40楼#
发布于:2019-05-23 15:41
lonely_8:location == "chrome://browser/content/browser.xul"
//改为
location.href.startsWith('chrome://browser/content/browser.x')...
回到原帖
测试有效,谢谢楼主大大的帮忙
etjim
火狐狸
火狐狸
  • UID30046
  • 注册日期2009-08-12
  • 最后登录2019-10-18
  • 发帖数142
  • 经验205枚
  • 威望0点
  • 贡献值46点
  • 好评度8点
  • 忠实会员
  • 社区居民
41楼#
发布于:2019-05-23 16:13
你好楼主大大,麻烦再帮忙看一下以下问题该怎么解决?
在FF68中有一个脚本附带的样式出现问题导致该脚本按钮不能弹出菜单,请问要如何修改该样式呢?
样式如下:
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url(chrome://browser/content/browser.xul){
 
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(10),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(11),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(12),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(13),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(14),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(15),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(16),
#ExtraConfigMenu-button > menupopup > menuitem[label="Startup-Cacheordner"] {
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADC0lEQVQ4jYWTa0wVBBiGXxHKLmyobUe3rFaOFBRcDAs1OM0WBsWEtZZQLSugUNSBI0wEFDAPMAQ6XGY5Qd2JDlK0qTDczDnDSmIoCmarcRiXgCmH2yE4l6c/xepH9Px+vmffj++T5uHbo7l+CeEh8fM5/4n9Qk1+0b43MFRYTq0urq0LtlrX/+/Q8MDAFvq7LBez42eeyypGg6Dm39DHX6G40lH/PQfPblnrGyZJsyNtz0wOdRr+FaiLf+LDS+WJB1XaNq2GHlR/GyVbMCamUWbZD13vgC0TT+9+sO3D1VnQLEn6Y+iXp+xtSTe4a5rBUc6d1nRWRr2J1mSwPT8HpgpgugrPeBXYK2Gigu4z7zNyJfO0JGnm3q9rGcrD4/gMt+0Q2LKhLw8G8sHxKZ67Zhg1M2sr4t7VNNoqkzgWG0C9Obxsbn1Xxwd4xo7jvBCHu8+Ep78Iek24bEdwdB2mtySWG4mPci76EW6ejMSabaBsT/SBucDQ2ZibDJqZOB/H1PepTLXuZLw1hYnz6UweXoOzdhH2muU07V3MriB/GvaGU53xaspcoL/mxWuuzmz6a40MWl+h3xJNX3EUM/Wv42kK5IfCeBICHyZ542M0ZoXSU7WBL46mvyZJmvoy6ZDz+ufYG2PpLAzgekkw3TufxNlSjftiKJc++YjYlYuo2+HPj/nBXMtfxzepy+luPRYhSaIjmYa3Q8d7zME07vKjPTUAR+Vu3B1bGT1jwrpNDJeu4ve8ZXTmLCEvxovcKB/aL1cHaOb2T0Hu796lvfCFse6KCHpLNjN7MgLXz+lw6wATV97jxI6Xydjsw5EEb7Zv8iYm2Hs2cvXCMUkbdM56Ytlk4UtwKwX31UCcLWFMn47A2RJDfZqRVQ/K9fhSTa7w08D9XuqSdFnS15LKJa2TJL21Qs0jmc/iyI1gLG8jwwWRmJ5fiqQ7kpokHZdUIGm3pG2SQsPCwh745xX73idlBfmqYf1iNS1ZoHpJOX/JmyQ9LclgMBgeMhqN3vP9k1dISIiPpIWSFswn/s2f5mHBqON1Ok8AAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
     
#ExtraConfigMenu-button > menupopup > menuitem[label="Startup-Cacheordner"] > .menu-iconic-text{
padding-left:7px !important;}
 
menuitem[label="Skriptliste in Zwischenablage"]{
-moz-binding: 
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important; 
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACHklEQVQ4jYXSQUhTcRzA8QdBhy7hpYPgxQ7VocPAXaZQCmMkKEUSqBA2WrjCUXhzAxM10LQZQ4NoOGswDCtcSbmM3HhaMicUtIWUDw0myDusMd97Y+a30zafG/WH7+3///D/wU8QBEF4t7aNazpBm2eVFne0bPYna7hnf6LlQDh8uqe+IKdVUhkNOa2WLZFM45rdwj7+oxRpfbhCKqMhSllWN3OFRCmLKGUJxXfRcvD6u4Lr1WYpcmnkE6mMpnt8EMkDseQeseQe/XNb9Ae+lQL5CwcTpSwL6wobO4pupCaXWArEt/d1Hf5FKL5L8OtvUhmNxsHlItB8vzxwGFlYV1hYV8oDclotC+SROwEzVq8BUcqWAo2Dy/8E4tv73Hx2nrvBVq48OoWcVv8POPx1OPx1dE4ZsXoNOF+2EIi66X7ejGWsknpnRA8kU3qgc8rITMxTKBB1437fjW9pCJvfQs29Y0Wg3hkhmVK5/KaY1WtgJuZhdN7B6LyDgTkbvcEOeoMdTIT7aJ+s5UzfUQqAJKt0hf/gTYA3AW2PTxOIuvF/HsG3NIRvaYiBOTsT4T5sfgsne6rQcloR2NhRuP4hV+jiRDWWsUoaHpzANFxB+2Qt44u9XHtqxuw5i/HW2+IITS4ROa0iySobO4qu/OaZhiu46mvggseAltP0mzi9uMWN0Sjnbn+kxh4qW7XzOFU9RzB1hbAOr/Ai8gtBEIS/L2O87ytW43AAAAAASUVORK5CYII=") !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;
padding-left:5px!important}
 
menuitem[label="Skriptliste in Zwischenablage"]>.menu-iconic-text{
padding-left:4px !important;}   
 
menuitem[label="Einstellungen"]{
-moz-binding: 
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important; 
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB/0lEQVQ4jY2STWjTYBjHX69et4Dvrq2HwS47exRUPIR5Uzz4wcY8FC8exNExYZCuFQJtusuKbIVAP0gqSCfkJBOmBF5pcWHHQkmz1nQQqhDN5OXvofSL0G7/8+//e3ie9yXHx19xWK2Ccw4yJUEQIL9/gC9HRzAMA5ZljdiEJMH3fZRLxakCTauAcw7HtpGQJHDO4XkefN/vdxQli4wsw7HtkIQxNoQzsoz8/gHKpSI0rQLDMEZ8p9PG9uZGSGIYBjzPg+u6ME0TmlaBomTBOcdhtTo5MAiCkIQxhkajAVVV0em04dg2PM8DY2zyFuPZ3tzARbMJQghJPngBzjlUVYWqqnBdF5ZlIbeXm3ozQgghbjKFlihCpxT//D9I7uwiubMLRcmiXCoiCILZgno0gl6pAJ1SfLh7D89ff5pdGM/1JxZic/OoRyP4Xf0InVJ8e/rsaoKF9RPc3DrDtdvf8erdKXRK0SsV0BJFpAVh5oebKC+lznH/8XtYmQx0ShE0GnAePkJaENA7/RGWjJcXpS5W4rUhNJBcNJtor64hLQj4+/NsJFmOMSxK3WH5zsvPoQk6pahHI0OJTmmfWYnXJsrLMTZ1x4FksI4TfwOSLxhYWD/BUuocN25Jl146NjePliiivbqGX91un8/t5bD1NoF6rXalp8rIMkzTBCGE/Aej45/2D3b80gAAAABJRU5ErkJggg==") !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;
padding-left:5px!important}
 
menuitem[label="Einstellungen"]>.menu-iconic-text{
padding-left:4px !important;}
 
menuitem[label="Neustart"]{
-moz-binding: 
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important; 
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89%2BbN%2FrXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz%2FSMBAPh%2BPDwrIsAHvgABeNMLCADATZvAMByH%2Fw%2FqQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf%2BbTAICd%2BJl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5AN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vUHm86C1JC2A%2FrGcn509cn%2BPvTk9ibc1R06qL91Ms1CadF000ll9rVS2VykLzVr0lHOgtpuJ9yUFyXxqhKZjbH2nJRI9IZwyw2kXjvXV%2FIOWgaBcc2a%2BtjdVXR1J3iBDx8QUpQUJAuJJclseogxz441H5vrPO72cm0VSyVPJq27ZaHm8ST3Y0M9d9Kkr19A1A1x4VIObTGBfNrsJ5XmE9b6KqgvrOGhr1Vns2sgeNIkXiigvHf1liZuHWZYjINSEXRVLewZjN6bYmYbvN4rcDvVzFKLnOpErMLBpvbklClznyyyPDA6DjTX3wJWICr%2Bnb3ffjXSGpl5Nxnn88uh2ORUCBaHfVQU%2BsjVuGhKqJT5lFYShr8fGH4j42bH53EnJ4EtgEEPQOTzHx9mqXLl9AT9TS82RvreOmVcMTXVh4JhIr5kp3LFu6u3Lk%2ByMylQazU3ENYAvw3AFUTimFqj5i7AAAAAElFTkSuQmCC") !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;
padding-left:5px!important}
 
menuitem[label="Neustart"]>.menu-iconic-text{
padding-left:8px !important;}
 
 
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(3) {
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByklEQVQ4jZ3Qz0uTARjA8adD/0qWF82KwNC62G1HrRgUL3iwOZU5XlHmeA/vYYsFY+/7TnROOnQNgs6RhFbLH9A7DV9ljg0Z+B4cbEO8CN8OG7wKbmgPfHlOz+fwiLQmbqyQMJYxrAxm+uoMK0PCWOad+QG5OHoyw+pajqkfIAaI1SYDQr/g6/ef6MmMh8zHTer1BsFvp3x06djU6imNeoP5uOkBs3qSWrWKvIf1BsT3wb8G3Z9AFkDMVhZICmrVKrN60gNULcGJ6yJJWCjC63Xo/Qy3MiCLIEsXsuDEdVG1hAeEIjGOKxUkBW9/dzhuAceVCqFIzAMm53SOSmXEhMdfOhwvgaThqFRmck73gICqUSwcIhbcznY4bgHFwiEBVfOAsVAEZ++g+bAsyEqbss2nOnsHjIUiHjAanGE77+A3tpBXOcTfppc53lhbbNsOo8EZD1AC02zsFNjMO9i7Dvm/V2fvOmzaDhs7BZTAtAcMK+PcfTDIvUfPLvfwKV19g3T1DVzqzv0BhpXxJhCOxqidnf9X4WgMCUdj/HFKpNLZa297v0wqnW0CE6qGb0ShdnZ+4z2haohvRKGnf4jeJ89vVE//EL4XCv8AU/F+h6m656UAAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
 
#ExtraConfigMenu-button > menupopup > menuitem:first-child,
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(5),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(6),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(7),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(8),
#ExtraConfigMenu-button > menupopup > menuitem:nth-child(9) {
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADFklEQVQ4jXXR3U9bdQDG8fMHbFcjLjFRE2PIEhsTTfTOK++8UmNc2JzeaIQ0GzFBnSxLUDvs1DnCRJSgvIjsFUYXNg/Ki8IKnfQFCm3T0xZq11Eobc/pK6ft+fXrxYyhMT7Jc/l8bh5J2heLZeKxmZlQdGU1oblXtjWXN6m5fBlt2ZfRFr2aKk/Hfzt84PAj0v/lwjcLjelkTvBP8gIeFAWr6Qq3lQLTgTIX+mZ+P7AfmYjSfS0o+q9E6B9yF8cmAyVjJlrlTrjCLaXMgLfEoCeDM17E5lZxx+BM38KCdPDgIUmSJOlnP7WLdsHQSpWh1QoDrj0653L0O3K8O7bDs71/0XIjSDRdYno9hyOgsxiBiz/MLTQ0NDwqjfrQupcENwNVuhb3sPl0+hx5bKt5Prid5LneKO9PBNnN6Tg3Svy6nuXassovCrSe7uqRBjcQX3lgJAwjCnzrrHD+bpEue573bCkaL8Uwjytki2UiqoE7UWZ2o4QtbGD97s6S9NTRsz1PvH5m9PFXP/rpyTfOTjYPOIzWy25ahpd550cHb35vp3tqjVTRYFM1WNup4IjrzCfB0ntrqe6Fl196q3Ezsq0blRJqrviw2QKpfJlEocb9nCCUruJNVnCp8FnPxGIdYLXOPq1Es/oesFuCnSIkCrCVrxHPGsQ0QSRtEEhV8Rfgk0s364GOjkmTP5LRCwK2C4KtvCCeE9zPCmJZQVQ1iKhVQqpAKUFH93g90N4+bvKGUrpWhQf7h5ogouko2Sz2eBRHPE9Yh/avx+qBtrYrJldwV09X+Xe4oQoiWo3lrTh3E2HkYIZR/xoezeDjL/8DDJuWAkk9WYZNTRBWBUrmYWeDGtfXfVz1xBj88x72ZIXTX1yvB06dGjbN+5J6ogwhtUYwLQikBYGMYH6zwohTYdC+zpgzgTsHbZ9frQdaWoee+SOQZxuI6hDZA6UE/iKs5cCegLkYONLg0qHt/A1PHXDkyAuHXjvx4eW3T1qmTpgt8nGzRT7Wck4+2nxObmrulJvMVvmY2So3NXfKx09ap55/8ZVP/waJWLfEOCt3rAAAAABJRU5ErkJggg==") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
 
 
#ExtraConfigMenu-button > menupopup  > menuitem:nth-child(-n+20) >.menu-iconic-text{
padding-left:8px !important;}
 
#submenu-about{
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menu-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC2ElEQVQ4jY2Se0wMABzHv2S9FHmkJjVxkmtCa/MIUa6a1jo9xKSRHJUpY3nMI4UeoqyHVrMe8yjXoiKrcGqLu5Yp1yGvKIm7SYjiOl//xW00379/n88f3+8PGCGygnSLQNGK0JFu/pmBuvxjzwMmMc7ZMF4VbGn2X5C644kPO1pKGg6E8E2kBVnqSNba8NlhE3ZGWtQtsDWdOqLgam7qHk3X66388Crw1l15W3yVgtGZhTwQF8AKicP7/Zt8AgBMH1FSeXKHffaT3o59rRrG3FfT5fJjmiXWEAFJdA1PrJPJZGMAwGu2mQfZbKoHn15sYlPU+XWo5oOWl3sG2fhxkHua39Eu7wERU054RHFV4EZl24Wc5HNiG5IFjnqCyEvXGss1Wsr7frCpb5CVPd8ZJ3/BmoZcajLXsGeXHe8EWlJV6Mkbp8c06MFKpdJKKG1l2ss+lnb381L3ALPbnvJHdTS1yULqioz5pdCKd/aOo2S2gPVVqbP0C8zPKjc4I6PH3S6GKt5yw612dqd5UysNIm8I2ZwSwmVz7Gls505YelGtlv2eVieNSCi5Vk1szqVR3j2OKn7Em9vmk7VZ/HnblVUnjhAOq4ng4zT330tvn5VUlIaKhwV8KOFR36W9EMUTW6U8u3MtmbOduhYxP5alULoe/Jxuz2+J5uxJMGTYcnMOw/1KufPPxnC2Z4jU0bERWlWaP1m8mEPtu0nVQX6tD2NOlJgbfW25I8qJQrEfjZ38CocFTdevW39OEZGqSFIxh7raRRw4705trR/LYpdwsmAeseUUUVxPi4wKjvfaPgRgJQCTYUnoNFzR7FvIb/Hu/JToRvVxb6a4TSBmLifWJRGxeTRLukhzT4kWMDwEwAOAvd4KpoDEdeKoarcpox9YG6IL42Z8wSyRFs5BOriE9GOasxLAMQBBAOYCMP7bJxsAGAtgEgABAFcA7gCWABACsBYIBEZ/Ar8AX7iDBFj3wIsAAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
 
#submenu-about > .menu-iconic-text{
padding-left:8px !important;}
 
 
#submenu-about-items > menuitem:nth-child(-n+20){
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACaUlEQVQ4jXWTX0iTYRSHX9SrLDWJoIugG6F/ULIokC5SIsIgiLwrhCnO9FPLtU2t5VSM5TSEsHRmFkXQhRcmiZEaYrWZTm0V5tRS5ip1iSup5P2ipwvFtpoHHs7V73nhvOcIEa50LoTORV33Z1QpsdhuhGXNYJyiJU7RroZ/Q1hCJToXiUXRJBZFU+fehpe9K4J65heXmJ4L4J1dwDu7gM8fYH5xCYutntVwZHoy9Y51QDRm5z4U91FUKTFb62jvGaD1iSOE9p4BzNa6vwL9gyg+kUADhTR9OczmnB2oUlJcUctaVVxRy+rro+ykgQKqA6eJyBBktjSiSompvIZxr5+3E74Qxr1+TOU1y4KIrFhuoeUOeWxRNpDfPUWlB1QpMVhsTPj8jHz4GMKEz4/BYlsWiKujxOQLzFMnuPZ8E7vOx6K5O4YqJXqzlY5eF62djhA6el3ozVaE0NgRtu+ImyBObqWHQ0AUefejUKUkr6hizRnkmyqDBNUSoT1IoTuFy/7jNM4loUqJYixjaGQSx7AHx7CHwSEvZ2aSOBtIRm+oChKUziBK3rP/SjyNaIkpEKhSkmMoZfjdJH1uD31uD+7XPta3COLbItEbq1a+UWNHlEwjdE2UDW7nyL0ERK4NVUqyz13k8bMh2rqctHU5edTdT+fTN/S+GCO38FKQoHYJkZ1Fdv8exKmNCPM3VCnJUExrziBDMQWtssaOuK4ilGOIC7cRth+oUqLNNfBqdIqHXc7/ujbX8M9BaewIjR3RDKJ5eQ8yFSMv3eN8/fmLdN25kJ6pGMNcZJBIlZLUtHR2H0gJS2paOn8Aay+SGqAm06EAAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
 
 
#submenu-about-items > menuitem:nth-child(-n+20) > .menu-iconic-text{
padding-left:6px !important;}
 
#submenu-ucjs{
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menu-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByklEQVQ4jZ3Qz0uTARjA8adD/0qWF82KwNC62G1HrRgUL3iwOZU5XlHmeA/vYYsFY+/7TnROOnQNgs6RhFbLH9A7DV9ljg0Z+B4cbEO8CN8OG7wKbmgPfHlOz+fwiLQmbqyQMJYxrAxm+uoMK0PCWOad+QG5OHoyw+pajqkfIAaI1SYDQr/g6/ef6MmMh8zHTer1BsFvp3x06djU6imNeoP5uOkBs3qSWrWKvIf1BsT3wb8G3Z9AFkDMVhZICmrVKrN60gNULcGJ6yJJWCjC63Xo/Qy3MiCLIEsXsuDEdVG1hAeEIjGOKxUkBW9/dzhuAceVCqFIzAMm53SOSmXEhMdfOhwvgaThqFRmck73gICqUSwcIhbcznY4bgHFwiEBVfOAsVAEZ++g+bAsyEqbss2nOnsHjIUiHjAanGE77+A3tpBXOcTfppc53lhbbNsOo8EZD1AC02zsFNjMO9i7Dvm/V2fvOmzaDhs7BZTAtAcMK+PcfTDIvUfPLvfwKV19g3T1DVzqzv0BhpXxJhCOxqidnf9X4WgMCUdj/HFKpNLZa297v0wqnW0CE6qGb0ShdnZ+4z2haohvRKGnf4jeJ89vVE//EL4XCv8AU/F+h6m656UAAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
     
#submenu-ucjs > .menu-iconic-text{
padding-left:8px !important;}
 
#submenu-ucxul{
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menu-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByklEQVQ4jZ3Qz0uTARjA8adD/0qWF82KwNC62G1HrRgUL3iwOZU5XlHmeA/vYYsFY+/7TnROOnQNgs6RhFbLH9A7DV9ljg0Z+B4cbEO8CN8OG7wKbmgPfHlOz+fwiLQmbqyQMJYxrAxm+uoMK0PCWOad+QG5OHoyw+pajqkfIAaI1SYDQr/g6/ef6MmMh8zHTer1BsFvp3x06djU6imNeoP5uOkBs3qSWrWKvIf1BsT3wb8G3Z9AFkDMVhZICmrVKrN60gNULcGJ6yJJWCjC63Xo/Qy3MiCLIEsXsuDEdVG1hAeEIjGOKxUkBW9/dzhuAceVCqFIzAMm53SOSmXEhMdfOhwvgaThqFRmck73gICqUSwcIhbcznY4bgHFwiEBVfOAsVAEZ++g+bAsyEqbss2nOnsHjIUiHjAanGE77+A3tpBXOcTfppc53lhbbNsOo8EZD1AC02zsFNjMO9i7Dvm/V2fvOmzaDhs7BZTAtAcMK+PcfTDIvUfPLvfwKV19g3T1DVzqzv0BhpXxJhCOxqidnf9X4WgMCUdj/HFKpNLZa297v0wqnW0CE6qGb0ShdnZ+4z2haohvRKGnf4jeJ89vVE//EL4XCv8AU/F+h6m656UAAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
 
#submenu-ucxul > .menu-iconic-text{
padding-left:8px !important;}
 
.uProfMenu_ucjs,.uProfMenu_ucxul{
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;
list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACaUlEQVQ4jXWTX0iTYRSHX9SrLDWJoIugG6F/ULIokC5SIsIgiLwrhCnO9FPLtU2t5VSM5TSEsHRmFkXQhRcmiZEaYrWZTm0V5tRS5ip1iSup5P2ipwvFtpoHHs7V73nhvOcIEa50LoTORV33Z1QpsdhuhGXNYJyiJU7RroZ/Q1hCJToXiUXRJBZFU+fehpe9K4J65heXmJ4L4J1dwDu7gM8fYH5xCYutntVwZHoy9Y51QDRm5z4U91FUKTFb62jvGaD1iSOE9p4BzNa6vwL9gyg+kUADhTR9OczmnB2oUlJcUctaVVxRy+rro+ykgQKqA6eJyBBktjSiSompvIZxr5+3E74Qxr1+TOU1y4KIrFhuoeUOeWxRNpDfPUWlB1QpMVhsTPj8jHz4GMKEz4/BYlsWiKujxOQLzFMnuPZ8E7vOx6K5O4YqJXqzlY5eF62djhA6el3ozVaE0NgRtu+ImyBObqWHQ0AUefejUKUkr6hizRnkmyqDBNUSoT1IoTuFy/7jNM4loUqJYixjaGQSx7AHx7CHwSEvZ2aSOBtIRm+oChKUziBK3rP/SjyNaIkpEKhSkmMoZfjdJH1uD31uD+7XPta3COLbItEbq1a+UWNHlEwjdE2UDW7nyL0ERK4NVUqyz13k8bMh2rqctHU5edTdT+fTN/S+GCO38FKQoHYJkZ1Fdv8exKmNCPM3VCnJUExrziBDMQWtssaOuK4ilGOIC7cRth+oUqLNNfBqdIqHXc7/ujbX8M9BaewIjR3RDKJ5eQ8yFSMv3eN8/fmLdN25kJ6pGMNcZJBIlZLUtHR2H0gJS2paOn8Aay+SGqAm06EAAAAASUVORK5CYII=") !important;
padding-left:5px !important;
-moz-image-region: rect(0px 16px 16px 0px) !important;}
 
.uProfMenu_ucjs>.menu-iconic-text,
.uProfMenu_ucxul>.menu-iconic-text{padding-left:6px !important;}
 
}
脚本如下:
// ==UserScript==
// @name           extras_config_menu.uc.js
// @compatibility  Firefox 8.*, 9.*, 10.*, 11.*, 12.*, 13.*, 14.*, 15.*, 16.*, 17.*, 57.*, 62.*
// @include        main
// @version        1.0.20180914
// ==/UserScript==
 
window.uProfMenu = {
  // Beginn der Konfiguration
  // In der folgenden Zeile (11) den Pfad zum Texteditor eintragen (unter Ubuntu 10.04 z.B.: '/usr/bin/gedit'). Bei Fehleintrag wird view_source.editor.path ausgelesen:
  TextOpenExe : 'D:\\Notepad++\\notepad++.exe',
  // Falls gewuenscht, in Zeile 15 einen Dateimanager eintragen (komplett leer lassen fuer Dateimanager des Systems) Beispiele:
  // vFileManager: 'E:\\Total Commander\\Totalcmd.exe',
  // vFileManager: 'C:\\Program Files (x86)\\FreeCommander\\FreeCommander.exe'
  vFileManager: '',
  // In der folgenden Zeile (19) 'menu' eintragen, damit es unter "Extras" als Menue erscheint, sonst die id des gewuenschten
  // Elements *nach* dem der Button erscheinen soll (z.B. 'urlbar', 'searchbar', 'undoclosetab-button','abp-toolbarbutton')
  // Bitte nicht so etwas wie die Menue- oder Navigationsleiste (sondern einen Menuepunkt oder einen Button mit id auf diesen Leisten) eintragen:
  warpmenuto: 'nav-bar-overflow-button',
 // Unter Linux sollte/kann versucht werden, die userChromeJS-Skripte zu sortieren, unter Windows ist das evtl. nicht noetig (die Sortierung wird Gross- und Kleinschreibung *nicht* beruecksichtigen - dazu wird die sort()-Funktion entsprechend mit einer Vergleichsfunktion aufgerufen)
  sortScripts: 0,   // 1 zum Erzwingen der Sortierung
  // Einbindung GM-Skripte-Ordner (0: nein, 1: Greasemonkey [Profil-Verzeichnis], 2: UserScriptLoader [Chrome-Verzeichnis], 3: Scriptish [Profil-Verzeichnis]):
  gmOrdner: 0,
  // Einbindung CSS-Ordner (0: nein, 1: UserCSSLoader-Ordner im Chrome-Verzeichnis):
  cssOrdner: 0,
  // In Zeile 30 gueltige about:Adressen eintragen, die ebenfalls aufgerufen werden sollen.
  // - Zum Ausblenden: abouts: [],
  // - Damit die about:-Seiten nicht als Untermenue, sondern direkt als Menuepunkte aufgefuehrt werden, muss das erste Element '0' sein:
  // abouts: ['0','about:about','about:addons','about:cache','about:config','about:support'],
   abouts: ['about:about','about:addons','about:cache','about:config','about:crashes','about:home','about:memory','about:healthreport','about:plugins','about:support','about:preferences','about:performance'],
  // Die normalen Firefox-Einstellungen auch zur Verfuegung stellen (0: nein, 1: ja):
  showNormalPrefs: 1,
  // Stellt "Skriptliste in Zwischenablage" zur Verfuegung (1: ja, 2: mit getrennter Nummerierung, 3: mit gemeinsamer Nummerierung) oder nicht (0):
  enableScriptsToClip: 0,
  // Um den Eintrag "Neustart" zu erzwingen (falls z.B. das andere Skript zu spaet eingebunden und nicht erkannt wird), auf 1 setzen:
  enableRestart: 0,
  // Ende der Konfiguration
 
  init: function() {
    if (this.warpmenuto.toLowerCase() == 'menu') {
      // aufgrund des gewaehlten warpmenuto als Untermenue von Extras anlegen
      var zielmenu = document.getElementById('menu_ToolsPopup');
      if (zielmenu==null) {
        userChrome.log("extras_config_menu.uc.js findet Zielmenue nicht, evtl. weil ein anderes Fenster als das Hauptfenster " +
                       "geoeffnet wurde. Falls dieser Fehler auch im Hauptfenster auftritt, bitte die vorgehende Definition " +
                       "von 'zielmenu' kontrollieren.");
        return;
      }
      var menu = zielmenu.appendChild(this.createME("menu","Config Men\u00FC",0,0,"ExtraConfigMenu"));
      menu.setAttribute("class","menu-iconic");
      menu.setAttribute("ondblclick","openTrustedLinkIn('about:config', 'tab');");
     } else {
      // als Button nach dem per warpmenuto gewaehlten Element anlegen (s. Kommentar ueber warpmenuto im Konfigurationsabschnitt)
      var zielmenu = document.getElementById(this.warpmenuto);
      if (zielmenu==null) {
        userChrome.log("extras_config_menu.uc.js findet Zielpunkt '"+this.warpmenuto+"' nicht, evtl. weil ein anderes Fenster als das Hauptfenster " +
                       "geoeffnet wurde. Falls dieser Fehler auch im Hauptfenster auftritt, bitte die vorgehende Definition " +
                       "von 'warpmenuto' kontrollieren.");
        return;
      }
      var menu = zielmenu.parentNode.insertBefore(document.createElement('toolbarbutton'), zielmenu.nextSibling);
      menu.setAttribute("id", "ExtraConfigMenu-button");
      menu.setAttribute("class", "toolbarbutton-1");
      menu.setAttribute("type", "menu");
      menu.setAttribute("tooltiptext", "Extra Config Menü\nMittelklick \öffnet about:config");
      menu.setAttribute("onclick", "if (event.button === 1 && !this.open) openTrustedLinkIn('about:config', 'tab');");
    }
    //ab hier ist alles gleich, egal ob Button oder Menue
    var css = " \
      #ExtraConfigMenu, #ExtraConfigMenu-button { \
        list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACnElEQVR4Xm2RzYtbZRSHn/fr3pvJzTB3qiNM2k2pMBUGhEHaqsUqdeFGQalCobgREaFu/B/cqCtxVSjoQhBEQRBmIfWDKgNGJUPt0Nhah9JJ4iSd5E6+bu5972tAO4SS5/DjXZ1znsMrNiq1eikMQqYYJCmjxNH5+zdW777L0J5KKl9VPmnf+ut9KWkwhbheuzNcOVYOmGKc5iRO0r1ykeXCx0h7kt4fC3z5wfqbQnAJwQHa5S7jAZSRuJ0mkf81cheobhBXZa+ri1uptQjHAZoZCEC1PiPgDuwxCfwerBU7b73zXn//3usCcdt4HkZ7SGZg431U51NUCgwlO3cV/bVXhR/6p9ut+nP9QYeNn7/n8qUPZxvQ/Q6VVWHk4ZqWRvlJjpx9hcGfW2wO95N2q8m3618A2WwDt/0RplSAXsBed57eyossHl5GYdHacG3zGpADM06wjQ1UUIN+CLHPvfAxojPnKLiE+bDE1R9+5GatAmgPeGCAteQ7l5GBhGSyuROyd/gFouUyWkqEErR2mwXAAA8BRS0AgMQBjSra30ZkEeDzz9Dn4ZcvMO51SMcJcTdGChmA0ABA6cAgzyG3I8jLEBylV4fWoaeIc0V7t0Uv7pFbC+CA+28mp/8+SwXKnMVmz1O9HpE+eobMZdjcoY1GIHD/NwIdoH1fBaNguzlg88pVyoUi4vTbFI8eJxsNAIfSkrliESllH/L0v0jktNNomFGv1TFrL3Fo9QSMR3jaEEXzLC09gjaKp595No0WjyCEB4zRclICUMDxtRMce/wJ1MIi2SglXShhfI/cOjxPoZRmbq4gXzt/gVrtBrdvbiG+Wf+p/mvll1BpiVAGhCDPxuAUDotz4HKHlIJON6bRbL4hhPjcMx5mkn8BBLEUrsVZbq0AAAAASUVORK5CYII=) !important; \
      } \
      #ExtraConfigMenu-button > dropmarker, #ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker { \
        display: none !important; \
      }";
    var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
    var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
    sss.loadAndRegisterSheet(uri,sss.AGENT_SHEET);
    menu.setAttribute("onpopupshowing","uProfMenu.getScripts(0)");
    var menupopup = menu.appendChild(this.createME("menupopup",0,0,0,"ExtraConfigMenu-popup"));
    menupopup.appendChild(this.createME("menuitem","userChrome.js","uProfMenu.edit(0,'userChrome.js');","uProfMenu_edit",0));
    // Anlegen von Untermenues fuer die userChromeJS-Skripte (befuellt werden sie spaeter)
    var submenu=menupopup.appendChild(this.createME("menu","uc.js",0,0,"submenu-ucjs"));
    var submenupopup = submenu.appendChild(this.createME("menupopup",0,0,0,"submenu-ucjs-items"));
    var submenu=menupopup.appendChild(this.createME("menu","uc.xul",0,0,"submenu-ucxul"));
    var submenupopup = submenu.appendChild(this.createME("menupopup",0,0,0,"submenu-ucxul-items"));
    if (this.enableScriptsToClip) menupopup.appendChild(this.createME("menuitem","Skriptliste in Zwischenablage","uProfMenu.getScripts(1)","uProfMenu_clipboard",0));
     // Ende Anlegen von Untermenues fuer die userChromeJS-Skripte
    menupopup.appendChild(document.createElement('menuseparator'));
    // Einbindung von Konfigdateien
    menupopup.appendChild(this.createME("menuitem","userChrome.css","uProfMenu.edit(0,'userChrome.css');","uProfMenu_edit",0));
    menupopup.appendChild(this.createME("menuitem","userContent.css","uProfMenu.edit(0,'userContent.css');","uProfMenu_edit",0));
    menupopup.appendChild(this.createME("menuitem","prefs.js","uProfMenu.edit(1,'prefs.js');","uProfMenu_edit",0));
    menupopup.appendChild(this.createME("menuitem","user.js","uProfMenu.edit(1,'user.js');","uProfMenu_edit"),0);
    // Ende Einbindung von Konfigdateien
    menupopup.appendChild(document.createElement('menuseparator'));
    // Einbindung von Ordnern
    switch (this.gmOrdner) {
      case 1:
        menupopup.appendChild(this.createME("menuitem","GM Skripte","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'gm_scripts');","uProfMenu_folder"),0);
        break;
      case 2:
        menupopup.appendChild(this.createME("menuitem","USL Skripte","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'UserScriptLoader');","uProfMenu_folder"),0);
        break;
      case 3:
        menupopup.appendChild(this.createME("menuitem","Scriptish Skripte","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'scriptish_scripts');","uProfMenu_folder"),0);
        break;
    }
    if (this.cssOrdner) {
      menupopup.appendChild(this.createME("menuitem","CSS-Ordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'CSS');","uProfMenu_folder"),0);
    }
    menupopup.appendChild(this.createME("menuitem","Chromeordner","uProfMenu.prefDirOpen('UChrm');","uProfMenu_folder"),0);
    menupopup.appendChild(this.createME("menuitem","Profilordner","uProfMenu.prefDirOpen('ProfD');","uProfMenu_folder"),0);
    menupopup.appendChild(this.createME("menuitem","Addonordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'extensions');","uProfMenu_folder"),0);
    menupopup.appendChild(this.createME("menuitem","Installationsordner","uProfMenu.prefDirOpen('CurProcD');","uProfMenu_folder"),0);
    menupopup.appendChild(this.createME("menuitem","Startup-Cacheordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfLD')+uProfMenu.getDirSep()+'startupCache');","uProfMenu_folder"),0);
    // Ende Einbindung von Ordnern
    // Einbindung von abouts
    if (this.abouts.length>0) {
      menupopup.appendChild(document.createElement('menuseparator'));
      // falls der erste Eintrag des arrays ='0' ist, dann kein Untermenue anlegen, sondern direkt als Menuepunkte einbinden
      if (this.abouts[0]=='0') {
        for (var i = 1; i < this.abouts.length; i++) {
         menupopup.appendChild(this.createME("menuitem",this.abouts[i],"openTrustedLinkIn('"+this.abouts[i]+"','tab')","uProfMenu_about"),0);
        }
       } else {
        // der erste Eintrag des arrays ist ungleich '0', deshalb als Untermenue einrichten
        var submenu=menupopup.appendChild(this.createME("menu","uc.js",0,0,"submenu-about"));
        var submenupopup = submenu.appendChild(this.createME("menupopup",0,0,0,"submenu-about-items"));
        this.fillMenu("submenu-about","submenu-about-items", "about:",this.abouts,"uProfMenu_about",1);
      }
    }
    // Ende Einbindung von abouts
    // Separator, falls dieser nicht schon durch abouts generiert wurde und weitere Menuepunkte folgen werden
    if (this.abouts.length==0 && (this.showNormalPrefs || typeof(ToolRstartMod) != "undefined")) menupopup.appendChild(document.createElement('menuseparator'));
    // Falls gewuenscht (s. Konfigurationsabschnitt), Zugriff auf die normalen Einstellungen
    if (this.showNormalPrefs) menupopup.appendChild(this.createME("menuitem","Einstellungen","try{openOptionsDialog();}catch(e){openPreferences();}","uProfMenu_prefs"),0);
    // Falls addRestartButton installiert ist, Neustart zur Verfuegung stellen (addRestartButton 1.0.20120105mod erforderlich)
    if(typeof(ToolRstartMod) != "undefined" || this.enableRestart) menupopup.appendChild(this.createME("menuitem","Neustart",
    "try{ToolRstartMod.restartApp(false);} catch(e){alert(e);}","uProfMenu_restart"),0);
 
  },
 
 
  getDirSep:function() {
    // Betriebssystem nach https://developer.mozilla.org/en/Code_snippets/Miscellaneous ermitteln
    var osString = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;
    var dirsep="/";
    switch(osString) {
      case "WINNT":
        dirsep="\\";
        break;
      case "Linux":
        dirsep="/";
        break;
      case "Darwin":
        dirsep="/";
        break;
    }
    return dirsep;
  },
 
 
  edit:function(OpenMode,Filename){
    var Path = "";
    var dSep = this.getDirSep();  // die Trennzeichen zwischen Ordnern abhaengig vom Betriebssystem machen
    switch (OpenMode){
      //Current is Chrome Directory
      case 0:
        var Path = this.getPrefDirectoryPath("UChrm") + dSep + Filename;
        break;
      //Current is Profile Directory
      case 1:
        var Path = this.getPrefDirectoryPath("ProfD") + dSep + Filename;
        break;
      //Current is Root
      case 2:
        var Path = Filename;
        break;
    }
    this.launch(this.TextOpenExe,Path);
  },
 
 
  dirOpen:function(Path){
    if (this.vFileManager.length != 0) {
      var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
      var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
      var args=[Path];
      file.initWithPath(this.vFileManager);
      process.init(file);
      // Verzeichnis mit anderem Dateimanager oeffnen
      process.run(false, args, args.length);
     } else {
      // Verzeichnis mit Dateimanager des Systems oeffnen
      var dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
      dir.initWithPath(Path);
      dir.launch();
    }
  },
 
 
  prefDirOpen:function(prefDir){
    Path = this.getPrefDirectoryPath(prefDir);
    this.dirOpen(Path);
  },
 
 
  getPrefDirectoryPath:function(str){
    // get profile directory
    var file = Components.classes["@mozilla.org/file/directory_service;1"]
      .getService(Components.interfaces.nsIProperties)
      .get(str, Components.interfaces.nsIFile);
    if (str == 'CurProcD') {
      file = file.parent;
    };
    return file.path;
  },
 
 
  launch:function(RanPath,OpenPath){
    var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsIFile);
    var proc = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
    var args = [OpenPath];
    file.initWithPath(RanPath);
    // falls der im Konfigurationsabschnitt definierte Editor nicht gefunden wird, auf Einstellung in about:config ausweichen:
    if (!file.exists()) {
      var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
      RanPath=pref.getCharPref("view_source.editor.path");
      file.initWithPath(RanPath);
    }
    proc.init(file);
    proc.run(false, args, args.length);
  },
 
 
  stringComparison:function(a, b){
    a = a.toLowerCase();
    a = a.replace(/ä/g,"a");
    a = a.replace(/ö/g,"o");
    a = a.replace(/ü/g,"u");
    a = a.replace(/ß/g,"s");
    b = b.toLowerCase();
    b = b.replace(/ä/g,"a");
    b = b.replace(/ö/g,"o");
    b = b.replace(/ü/g,"u");
    b = b.replace(/ß/g,"s");
    return(a==b)?0:(a>b)?1:-1;
  },
 
 
  getScripts:function(iType) {
    // Arrays (jeweils ein Array fuer uc.js und uc.xul) nehmen Namen der gefundenen Skripte auf
    let ucJsScripts = [];
    let ucXulScripts = [];
    // Suchmuster, also die Dateierweiterungen uc.js und uc.xul
    let extjs = /\.uc\.js$/i;
    let extxul= /\.uc\.xul$/i;
    let aFolder = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
    aFolder.initWithPath(Services.dirsvc.get("UChrm", Ci.nsIFile).path);
    // files mit Eintraegen im Chrome-Ordner befuellen
    let files = aFolder.directoryEntries.QueryInterface(Ci.nsISimpleEnumerator);
    // Ordner bzw. files durchlaufen und kontrollieren, ob gesuchte Dateien dabei sind
    while (files.hasMoreElements()) {
      let file = files.getNext().QueryInterface(Ci.nsIFile);
      // keine gewuenschte Datei, deshalb continue
      if (!extjs.test(file.leafName) && !extxul.test(file.leafName)) continue;
      // uc.js gefunden -> im Array ablegen
      if (extjs.test(file.leafName)) ucJsScripts.push(file.leafName);
      // uc.xul gefunden -> im Array ablegen
      if (extxul.test(file.leafName)) ucXulScripts.push(file.leafName);
    }
    if (this.sortScripts) {
      ucJsScripts.sort(this.stringComparison);
      ucXulScripts.sort(this.stringComparison);
    }
    // Aufruf der naechsten Methoden um die beiden Untermenues oder die Zwischenablage zu befuellen
    if (iType==0) {
      this.fillMenu("submenu-ucjs","submenu-ucjs-items", "uc.js",ucJsScripts,"uProfMenu_ucjs",0);
      this.fillMenu("submenu-ucxul","submenu-ucxul-items", "uc.xul",ucXulScripts,"uProfMenu_ucxul",0);
     } else {
      var result=this.fillClipboardValue(ucJsScripts,ucXulScripts);
      Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper).copyString(result);
    }
  },
 
 
  fillMenu:function(whichsubmenu, whichsubmenuitems, strlabel, scriptArray,sClass,sTyp) {
    // Beschriftung des Untermenues mit Anzahl der gefundenen Dateien ergaenzen
    var e = document.getElementById(whichsubmenu);
    e.setAttribute('label',strlabel + ' (' + scriptArray.length + ')');
    var popup = document.getElementById(whichsubmenuitems);
    // zunaechst Untermenue zuruecksetzen
    while(popup.hasChildNodes()){
      popup.removeChild(popup.firstChild);
    }
    // Untermenue endlich befuellen
    for (var i = scriptArray.length-1; i > -1; i--) {
      // bisher nur eine Typunterscheidung (userChromeJS-Skript oder about:)
      if (sTyp==0){
        var mitem = this.createME("menuitem",scriptArray[i],"uProfMenu.edit(0,'"+scriptArray[i]+"')",sClass,0);
        mitem.setAttribute("onclick","uProfMenu.openAtGithub(event,'"+scriptArray[i]+"')");
        mitem.setAttribute("tooltiptext"," Linksklick: Bearbeiten,\n Mittelklick: https://github.com/.../"+this.cleanFileName(scriptArray[i])+" \u00F6ffnen,\n Rechtsklick: Suche auf GitHub");
       } else {
        var mitem = this.createME("menuitem",scriptArray[i],"openTrustedLinkIn('"+scriptArray[i]+"','tab')",sClass,0);
      }
      popup.insertBefore(mitem, popup.firstChild);
    }
  },
 
 
  fillClipboardValue:function(sArray,xArray) {
    var retValue;
    var s = 0;
    var x = 0;
    s = sArray.length;
    x = xArray.length;
    switch(this.enableScriptsToClip) {
      case 1:
        retValue = "userChromeJS/uc.js ("+s+"):\n------------------------\n"+sArray.join("\n")+
                   "\n\nuserChromeJS/uc.xul ("+x+"):\n-------------------------\n"+xArray.join("\n");
        break;
      default:
        retValue = "userChromeJS/uc.js ("+s+"):\n------------------------";
        for (var i = 0; i < s ; i++) {
          j = i + 1;
          retValue = retValue + "\n" + j + ". " + sArray[i];
        }
        retValue = retValue + "\n\nuserChromeJS/uc.xul ("+x+"):\n-------------------------";
        if (this.enableScriptsToClip==2) s = 0;
        for (var i = 0; i < x ; i++) {
          j = i + s + 1;
          retValue = retValue + "\n" + j + ". " + xArray[i];
        }
        break;
    }
    return retValue;
  },
 
 
  createME:function(sTyp,sLabel,sCommand,sClass,sId) {
    // Anlegen von menuitem, menu oder menupop - fuer bestimmte Typen nicht eingesetzte Parameter werden als 0 uebergeben
    const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    var m = document.createElementNS(XUL_NS, sTyp);
    switch (sTyp) {
      case "menuitem":
        // this.createME("menuitem","Label des Items","ZuzuweisenderCodeFueroncommand","GewuenschteKlasseDesItems",0)
        m.setAttribute('label', sLabel);
        m.setAttribute('oncommand',sCommand);
        m.setAttribute('class',sClass);
        break;
      case "menu":
        // this.createME("menu","Label des Menues",0,0,"GewuenschteIdDesMenues")
        m.setAttribute('label', sLabel);
        m.setAttribute('id', sId);
        break;
      case "menupopup":
        //this.createME("menupopup",0,0,0,"GewuenschteIdDesMenupopups");
        m.setAttribute('id', sId);
        break;
    }
    return m;
  },
 
 
  openAtGithub:function(e,sScript) {
    if (e.button==1){
      // Mittelklick - Seite auf GitHub oeffnen (funktionier nur, wenn Ordner- und bereinigter Dateiname [ohne Erweiterung] uebereinstimmen):
      var sUrl="https://github.com/ardiman/userChrome.js/tree/master/"+this.cleanFileName(sScript);
      openWebLinkIn(sUrl, 'tab');
    }
    if (e.button==2){
      // Rechtsklick - Suche auf GitHub starten (funktioniert nur, wenn der Dateiname im Code hinterlegt ist):
      e.preventDefault();
      var sUrl="https://github.com/search?langOverride=&language=&q="+sScript+"&repo=&start_value=1&type=Code";
      openWebLinkIn(sUrl, 'tab');
    }
  },
 
 
  cleanFileName:function(sName) {
    sName=sName.toLowerCase();
    /* Das folgende Array enthaelt regulaere Ausdruecke, um ungueltige Zeichenfolgen entfernen:
    /Datei-Erweiterungen am Ende/, /"ucjs_" am Anfang/, /"_"gefolgtVonZahlUndDanachBeliebigenZeichen/
    / "_fx"gefolgtVonZahl(en)/, /"-" oder "+" oder "."/, /"_v"gefolgtVonZahlen
    */
    var regs=[/\.uc\.js$/,/\.uc\.xul$/,/^ucjs_/,/_\d.+/,/_fx\d+/,/[-+\.]/g,/_v\d+/];
    for (var i = 0; i < regs.length; i++) {
      sName=sName.replace(regs[i],"");
    }
    return sName;
  }
 
};
uProfMenu.init();
lonely_8
狐狸大王
狐狸大王
  • UID30273
  • 注册日期2009-09-03
  • 最后登录2019-10-15
  • 发帖数485
  • 经验247枚
  • 威望0点
  • 贡献值72点
  • 好评度75点
  • 社区居民
  • 忠实会员
42楼#
发布于:2019-05-23 17:08
etjim:你好楼主大大,麻烦再帮忙看一下以下问题该怎么解决?
在FF68中有一个脚本附带的样式出现问题导致该脚本按钮不能弹出菜单,请问要如何修改该样式呢?
样式如下:
@namespace url(http://www.mozilla.org/...
回到原帖
/*样式部分*/

/*1、替换*/
@-moz-document url(chrome://browser/content/browser.xul)
/*为*/
@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml)

/*2、删除所有*/
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menu-iconic") !important;
/*和*/
-moz-binding:
url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;


//uc 脚本部分
  
//1、替换所有的
document.createElement
//为
document.createXULElement
//注意不要替换 document.createElementNS
  
  
//2、【分别】在350-351、355-356,行之间,即都是在 break; 所在行上方加入
m.classList.add('menuitem-iconic');
//和
m.classList.add('menu-iconic');
//这行代码。
etjim
火狐狸
火狐狸
  • UID30046
  • 注册日期2009-08-12
  • 最后登录2019-10-18
  • 发帖数142
  • 经验205枚
  • 威望0点
  • 贡献值46点
  • 好评度8点
  • 忠实会员
  • 社区居民
43楼#
发布于:2019-05-23 17:26
lonely_8:/*样式部分*/

/*1、替换*/
@-moz-document url(chrome://browser/content/browser.xul)
/*为*/
@-moz-document url(chrome://brows...
回到原帖
感谢楼主大大,修改后脚本按钮菜单可以弹出来了
MalcKear
千年狐狸
千年狐狸
  • UID35386
  • 注册日期2011-03-05
  • 最后登录2019-05-23
  • 发帖数1348
  • 经验131枚
  • 威望0点
  • 贡献值16点
  • 好评度10点
  • 社区居民
  • 忠实会员
44楼#
发布于:2019-05-23 20:22
楼主老人了,支持下!UC一直在用
游客

返回顶部