阅读:5507回复:6
【已解决】从94.0正式版在线升级到95.0b1版后,这3个脚本失效了,请大神修复!谢谢
这三个脚本在94版本中一直都可以正常使用,今天在线升级到95.0b1后发现这3个脚本失效
再次麻烦大神@lonely_8 帮忙看能否修复下,万分感谢!!! // 03. 主页按钮在新标签打开 (function() { // 新标签打开:主页按钮(排除about:blank和about:newtab) try { eval("BrowserHome = " + BrowserHome.toString() .replace(/switch \(where\) {/, "where = (gBrowser.currentURI.spec!="+"'about:blank' && gBrowser.currentURI.spec!="+"'about:newtab' || gBrowser.webProgress.isLoadingDocument"+") ? 'tab' : 'current'; $&")); }catch(e){} })(); // 04. 在新标签页查看图片(左键为前台标签打开,中键、右键则为后台标签打开) location.href == 'chrome://browser/content/browser.xhtml' && setTimeout(function() { const viewImage = document.getElementById('context-viewimage'); if(!viewImage) return; viewImage.removeAttribute('oncommand'); viewImage.addEventListener('command', function (e) { let where = whereToOpenLink(e, false, false); if (where == "current") { where = "tab"; } let referrerInfo = gContextMenu.contentData.referrerInfo; let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal(); if (gContextMenu.onCanvas) { gContextMenu._canvasToBlobURL(gContextMenu.targetIdentifier).then(function(blobURL) { openLinkIn(blobURL, where, { referrerInfo, triggeringPrincipal: systemPrincipal, inBackground: e.button !== 0 }); }, Cu.reportError); } else { urlSecurityCheck( gContextMenu.mediaURL, gContextMenu.principal, Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT ); // Default to opening in a new tab. openLinkIn(gContextMenu.mediaURL, where, { referrerInfo, forceAllowDataURI: true, triggeringPrincipal: gContextMenu.principal, csp: gContextMenu.csp, inBackground: e.button !== 0 }); } }); }, 1000); // 05. 重新载入全部标签页 location.href.startsWith('chrome://browser/content/browser.x') && (() => { const reloadTab = document.getElementById('context_reloadTab'); if(!reloadTab) return; const menuitem = document.createXULElement('menuitem'); menuitem.setAttribute('accesskey', 'A'); menuitem.setAttribute('label', reloadTab.getAttribute('label') .startsWith('Reload') ? 'Reload All Tabs' : '重新载入全部标签页' ); menuitem.addEventListener('command', () => { gBrowser.visibleTabs.forEach(tab => { try { gBrowser.getBrowserForTab(tab).reload(); } catch (e) {} }); }); reloadTab.after(menuitem); })(); |
|
1楼#
发布于:2021-11-03 15:21
之前的帖子不是回复过你了吗?
我这无论 93 正式版、Nightly 96,都没问题,特意下载了 95.0b1 测试了同样没问题。 新建配置测试一下把。或者打开 FF 后,ctrl + shift + j 打开浏览器控制台将错误信息发出来看看。 |
|
2楼#
发布于:2021-11-03 15:52
lonely_8:之前的帖子不是回复过你了吗?之前的帖子你说你那里没问题,于是我自己折腾了好多天实在是没弄好,又从940b升级到950b也没有折腾好,所以又重新开贴麻烦你了,实在是不好意思。 新建配置试了下这3个脚本还是失效,这是控制台的错误信息,再次麻烦你! TypeError: date is undefined TelemetryUtils.jsm:154:1 1635925970217 addons.webextension.smartproxy@salarcode.com ERROR Loading extension 'smartproxy@salarcode.com': proxy-error before extension startup: Error: listener not re-registered Log.jsm:723 1635925970218 addons.webextension.smartproxy@salarcode.com ERROR Loading extension 'smartproxy@salarcode.com': proxy-error before extension startup: Error: listener not re-registered 8 Log.jsm:723 Unknown localization message weh_prefs_label_downloadcompletedelay main.js:1 Unknown localization message weh_prefs_description_downloadcompletedelay main.js:1 Unknown localization message weh_prefs_label_tbvwsgrabdelay main.js:1 Unknown localization message weh_prefs_description_tbvwsgrabdelay main.js:1 Unknown localization message weh_prefs_label_forcedcoappversion main.js:1 Unknown localization message weh_prefs_description_forcedcoappversion main.js:1 Error: Can't find profile directory. XULStore.jsm:66:15 uncaught exception: Unable to load script: moz-extension://05d4bb51-15d2-49bb-b55b-0736c3be2141/moz-extension://05d4bb51-15d2-49bb-b55b-0736c3be2141/assets/browser-polyfill.min.js www.baidu.com : server does not support RFC 5746, see CVE-2009-3555 [object Object] ExtensionCommon.jsm:734 this.window.gBrowserInit is undefined 2 ext-browser.js:1102 tabs is undefined background.index.js:1384 Unchecked lastError value: Error: An unexpected error occurred background.index.js:1383 |
|
3楼#
发布于:2021-11-03 16:15
你贴出的日志没相关的错误信息。
另外是只有这三个脚本有问题吗,其它的脚本都正常? 你使用的是哪个 UC 脚本的加载方案? 顺便排查一下脚本文件名、脚本编码是否为无 BOM UTF-8。 |
|
4楼#
发布于:2021-11-03 16:42
还有几个脚本中的某一项的不常用的功能也有失效,不想麻烦别人,我也就无所谓了
我上传了这个脚本,其中3/4/5项的功能失效了,请大神再看看吧,再次感谢! |
|
|
5楼#
发布于:2021-11-03 19:48
是脚本第 2 项的功能运行出错,中断了脚本后续的执行。
将 goPopup 改为 historyMenuPopup |
|
6楼#
发布于:2021-11-03 20:50
|
|