333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-09-23
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
阅读:752回复:4

【已解决】升级到67.0b3后,一些UC脚本要重新打开在关闭好几次Firefox才能运行,怎么解决?

楼主#
更多 发布于:2019-03-20 18:42
升级到67.0b3后,打开Firefox,一些脚本不能运行
 
 然后发现,打开Firefox再关闭,重复这么操作几次后,UC脚本可以正常运行了,
 
 这是什么问题?怎么解决呢?



解决办法:用下面链接的 addMenuPlus.uc 替换旧版本,问题可解决
链接: https://pan.baidu.com/s/1IwRdLEsZF9OVrQnc65rCxQ 提取码: gzvv
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-09-23
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
1楼#
发布于:2019-03-21 08:14
找到了一个addMenuPlus67.uc替换原来的,可以正常加载了,但是以下脚本还是失效了,希望@lonely_8 大佬帮忙,谢谢

addMenuPlus67.uc下载地址: https://pan.baidu.com/s/1xpv8Yqcv0gURAQ9N8jgWLw 提取码: qe5s
new function () {
    var items = [
    {label:"复制当前标签【标题】",
    oncommand: function() {addMenu.copy(addMenu.convertText("%TITLE%"));},
    image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAXElEQVQ4jWNgGCzgPxZMSA2GJKkWEmXAfwYGBg9yDfBgYGCYCcXEWogCjjIwMChDaZIBssY8KCYJ5DGghjhJrlBmwPTjTKg4ToCsAVvAeaCJ0S8dkGQARUl54AAAWsMsNkwmkt8AAAAASUVORK5CYII="},
    {label:"复制当前标签【地址】",oncommand: function() {addMenu.copy(addMenu.convertText("%URL%"));},image:""},
    {label:"复制当前标签标题和地址",
    oncommand: function() {addMenu.copy(addMenu.convertText("%TITLE%\n%URL%"));},image:""},
    {label:"复制当前标签源代码",oncommand: function() {addMenu.copy(addMenu.convertText( '<a href="%URL%" target="_blank">%TITLES%</a>'));},image:""},
{},
{label:"复制所有标签标题",oncommand: function() {(function(){
                        var gClipboardHelper = Components.classes['@mozilla.org/widget/clipboardhelper;1'].getService(Components.interfaces.nsIClipboardHelper);
            var titles = "";
            Array.slice(gBrowser.tabContainer.childNodes).forEach(function(tab) {
                titles += tab.label + "\n";
            });
            gClipboardHelper.copyString(titles);   
    })();},image:""},
        {label:"复制所有标签地址",oncommand: function() {(function(){
            var gClipboardHelper = Components.classes['@mozilla.org/widget/clipboardhelper;1'].getService(Components.interfaces.nsIClipboardHelper);
            var URLs = "";
            Array.slice(gBrowser.tabContainer.childNodes).forEach(function(tab) {
                var url = gBrowser.getBrowserForTab(tab).currentURI.spec;
                URLs += url + "\n";
            });
            gClipboardHelper.copyString(URLs);      
    })();},image:""},
        {label:"复制所有标签标题和地址",oncommand: function() {(function() {
            var gClipboardHelper = Components.classes['@mozilla.org/widget/clipboardhelper;1'].getService(Components.interfaces.nsIClipboardHelper);
                                                var txt = "";
            Array.slice(gBrowser.tabContainer.childNodes).forEach(function(tab) {
                 var url = gBrowser.getBrowserForTab(tab).currentURI.spec;
                txt += tab.label + "\n" + url + "\n";
            });
            gClipboardHelper.copyString(txt); 
        })();},image:""},
        {label:"复制所有标签HTML链接",oncommand: function() {(function() {
            var gClipboardHelper = Components.classes['@mozilla.org/widget/clipboardhelper;1'].getService(Components.interfaces.nsIClipboardHelper);
            var txt = "";
            Array.slice(gBrowser.tabContainer.childNodes).forEach(function(tab) {
                 var url = gBrowser.getBrowserForTab(tab).currentURI.spec;
                txt += "<a href=" + "\""+ url +"\" "+  "target=\"_blank\">" +  tab.label + "</a>"+ ""+ "\r";
            });
            gClipboardHelper.copyString(txt);  
        })();},image:""},
  
    {},
    {
        label:"复制 Favicon 的 URL",
        text:"%FAVICON%",
        image:" "
    }, {
        label:"复制 Favicon 的 Base64",
        text:"%FAVICON_BASE64%",
        image:" "
    }
    ];
    var menu = TabMenu({id:"context_TabInfoCopy",onpopupshowing: syncHidden});
    menu(items);
};
  
  
  
  
  
  
//复制链接文本地址
new function () {
    var items = [
    {
        label:"复制链接地址(A)",
        command:"context-copylink",
        image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFklEQVQ4T6XTvSuGURzG8c+zGxnIoCgbCyUGiUnJSylSDFIGmZWUEjbFaFCUmESUxcugsBhkpSz4FwwGnTp33Y/u57nVfbbz8vv+znWd65QUHKWC9f4DaMc2OvCGTRwnjfMAwzjEMg7Qi10sYS9AqgFGY9EIrlNSJ7GK1jxAExpwj3p8RUhbXKupBOjGJ95jwRzW0IifKGcIXVmAfpxiBicIxTvowyMSTwbivMyDQLxB0HiGBWxhEFcYw36c32W9wgPOsYG6KGEq3iicb0Ft0jkL8I1OvMTNxLgefKQ8Kcte+hlfsYKj1IngSZAzgYus1KYBszFl87jFNNYxjstKkf8bpGBgSFkznrCI52r/JS/KuX+tMOAX/9gzEZGy3OQAAAAASUVORK5CYII="
    },
    {
        label:"复制链接文本",
        text:"%LINK_TEXT%",
        image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA/0lEQVQ4T6XTsStFYRjH8c/9SzDJYJDFIAausitGBgOLwT/AYuCKQSmjhUERmxR/giiMymIUmQz06L11ei+9p+5bZzrP++37/H7nNHR5GpX7OxiqwfvAHD5jtgp4xi5uC5Br9CHmOwDzuCkAvkuAcaz9AblCE0VA1wY9WEgGF9jObIoGEU5vuvSKpwwQhtFCvKsV4gQ2U3BnaOGhDc1rzFsYxSmWECFOYj+F+Vt3CXCOExwistnAJabTGkXAPRaxh/cEiN2PMFjH4BiPaecRrGIZY/8ZvCGeOF9YwR0OkvoUZjCMl9xgFgOVyqLv9aQa30V/qnSrXWEOqPEjdo78AAIxShEhs/7CAAAAAElFTkSuQmCC"
    },
    {
        label:"复制链接文本+地址",
        text:"%LINK_TEXT%\n%l",
        image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAPklEQVQ4jWNgoCL4TyQWwGcAIQtgNFZDiDUAp1piDEDGBA3A6VdCBhAKRIIGEAOGqAuINoBiFwysAaRg6gAAE7tI6EZZDKkAAAAASUVORK5CYII="
    },
    {
    label: "复制链接源代码",
    tooltiptext: "左键:HTML代码\n中键:UBB代码\n右键:MD代码",
    onclick: function(event) {
        var formats = [
           '<a href="%l" target="_blank">%LINK_TEXT%</a>',
            "<a href="%RLINK_OR_URL%">%RLT_OR_UT%</a>",
            "[%RLT_OR_UT%](%RLINK_OR_URL%)",
        ];
        var str = addMenu.convertText(formats[event.button]);
        addMenu.copy(str);
        if (event.button === 1) { // 中键点击后自动关闭菜单
            document.getElementById("contentAreaContextMenu").hidePopup();
        }
    },
    image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAFVBMVEUAAAAAAABmZmbc3Ny3t7eRkZE6OjpRDxSxAAAAAXRSTlMAQObYZgAAADJJREFUCNdjwASCECDAIADhY2UwMQoKsgqAGUyMJiAGoyATYzJMhEEYxhDAoh1hBQYAAPxVA4qkxzcpAAAAAElFTkSuQmCC"
},
      
          
          
          
];
    var menu = PageMenu({ condition:'link', insertBefore:'context-openlink',icon:'image',   image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABdklEQVQ4T43TPUiXURTH8Y9pJSpFIEKamxAYhEO1ikOQFAlODTkIgr1gRQSlEA2CvUCUREWBEjQ4FYHoII7i4mpLU0VDRNbQC9WgceI88OchX+723Ht/33t+v3OeKltbO9CGarzB70JWtQX9cTzHnrz7Ew9wI0CbAU6neBUv8AsnEnYTI5sBDqAD77CQFezGMprRtB4g9g+hDq/xuWT1Ic7hWBkQ30O4gtYURfkvcQYruTeFU2VAiCfQjz94gm3owy7cwVV0YT470VJUUCmOFp3EXL4WlYzhPA5jBjtxGfcKwFk8wg90YwmjKfyaoEg/rGzHJAawFoB6fEQtOrGI+7iYoFk0YhA1eJwB/uMG4GiW+yz9x35TZhBWIodYa7iN4cqOBKAHr3A3068834v9GVj0/lt5cgOwD2/xHgfxPS8dQUva+LDeyBchjuMCvmAaDehNi9ey9P8yCkC05RYuVdz6hOt4utEPV57EeLk9RzdsxRRuuP4CTWBJwwkoqucAAAAASUVORK5CYII=",onpopupshowing: syncHidden });
    menu(items);
    items.forEach(function(it){
        if (it.command)
            css('#contentAreaContextMenu[addMenu~="link"] #' + it.command + '{ display: none !important; }')
    });
};
  
  
//图片
new function () {
    var items = [
    {command: 'context-copyimage-contents',
     image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAnElEQVQ4jWNgGCzgAwMDw38S8XtkA/6TYel/bJwEqMn7GRgYBAgYsAGbAR8YGBgMoJIFBAxAkYcZcIGBgWE91BUOeDQvYMDhBQGoyQ5Ql2AzpABqEVYDYCCBAeKdD1A2DARAxQTwGQDTbADFFxgYGOZD2Q+gNIalyLGArAjmrQNQNQlY9GAYgCv6DND4eMOAGICih5yk/IEMS2kAABDmRWASmruSAAAAAElFTkSuQmCC"
    },
    {command: 'context-reloadimage'},
    {command: 'context-copyimage'},
    {
        label:"复制图片 Base64",
        text:"%IMAGE_BASE64%",
        image:" "
    },
    {command: 'context-saveimage'},
    {command: 'context-viewimageinfo'},
  
    {},
        {
    label: "以图识图",
    tooltiptext: "谷歌/百度/搜狗/tineye",
    condition: "image",
    image: " ",
    oncommand: function() {
        var url = encodeURIComponent(gContextMenu.mediaURL || gContextMenu.imageURL || gContextMenu.bgImageURL);
        gBrowser.addTrustedTab('http://www.google.com/searchbyimage?image_url=' + url);
        gBrowser.addTrustedTab('http://image.baidu.com/pcdutu?queryImageUrl=' + url);
        gBrowser.addTrustedTab('http://pic.sogou.com/ris?query=' + url);
        gBrowser.addTrustedTab('http://www.tineye.com/search/?pluginver=firefox-1.0&sort=size&order=desc&url=' + url);
    }
},];
      
    var menu = PageMenu({ condition:'image', id:'context-copyimage_new',insertAfter:'context-viewimage', icon:'image',  image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAQCAYAAAAbBi9cAAABqUlEQVQ4T7WTO0gDQRCG/9lNULAQUQRBNF6SixYicuYKsRYrbWwELaKWqWxsLLQQH51Ya5HGUgVBBAtRRDT4KDUPLAw2FmKKJODdjlyCcD5OouBWy87MN49/luBx9JCZIHCb22xDDGcy5/nvQsgTFOyLg0ST214oyZVc7qzovGma0eYTctK528wbpIfMeS/Yt5lttQWBJhBNgShW9mFsUiRs8m9AYDUCiC4Qlt1x/wKavUtfrFZbna4ZAyTlSdlfqQF3RbNQ6hREi47NYkxks8mHTs3oVkLGCBxkxrEiK5HJXD9pmlEvBPVWEsurjyBL7bIUY45JFLH+Wms1SPLdArgH+ADAMIieX/Kl/ro6f+MH1VzD/tKaHoouEGH6Lp1sdbQJBAK1Nf7mJ4Dn2FaXnq19nlEkaK6w4N5UOjn4Pjs9bN6AsQNlH/4CFB1ioj1AxSB4n1mOCvAav6oeZ5eqBgEgPRidIYElgPxgLjDTeCp7sf2jal7yt7cbLT6f6CgW1c3j42XBadMTxOBDMJ1Wu0flD/3+RT7tUbWMr35lUCh69HdCJdJijr8BP9bKXB0KZjgAAAAASUVORK5CYII=",onpopupshowing: syncHidden});
    menu(items);
    items.forEach(function(it){
        if (it.command)
            css('#contentAreaContextMenu[addMenu~="image"] #' + it.command + '{ display: none !important; }')
    });
};
新垣结衣
小狐狸
小狐狸
  • UID55997
  • 注册日期2017-09-25
  • 最后登录2019-09-23
  • 发帖数87
  • 经验98枚
  • 威望0点
  • 贡献值60点
  • 好评度8点
  • 忠实会员
  • 社区居民
2楼#
发布于:2019-03-21 15:39
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-09-23
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
3楼#
发布于:2019-03-21 18:11
新垣结衣:故障听起来像这个 https://www.firefox.net.cn/read-79009-1#367432回到原帖
谢谢,应该不是这个原因,还是代码问题。
333ywb
小狐狸
小狐狸
  • UID27284
  • 注册日期2008-12-03
  • 最后登录2019-09-23
  • 发帖数93
  • 经验102枚
  • 威望0点
  • 贡献值100点
  • 好评度0点
  • 社区居民
  • 忠实会员
4楼#
发布于:2019-05-05 18:03
希望有大佬来帮忙啊
游客

返回顶部