lonely_8
非常火狐
非常火狐
  • UID30273
  • 注册日期2009-09-03
  • 最后登录2022-08-09
  • 发帖数733
  • 经验469枚
  • 威望0点
  • 贡献值86点
  • 好评度147点
  • 社区居民
  • 忠实会员
15楼#
发布于:2018-04-28 14:18
https://github.com/FelisCatus/SwitchyOmega/issues/1451

--- js\omega_target_chromium_extension.min.js   2018-01-27 21:15:56.000000000 +0800
+++ js\omega_target_chromium_extension.min.js  2018-04-27 22:39:50.000000000 +0800
@@ -4433,13 +4433,13 @@
 Promise = OmegaTarget.Promise;
   
 querystring = require('querystring');
   
 chromeApiPromisify = require('./chrome_api').chromeApiPromisify;
   
-if (typeof chrome !== "undefined" && chrome !== null ? (ref = chrome.proxy) != null ? ref.settings : void 0 : void 0) {
+if (typeof browser === "undefined" && typeof chrome !== "undefined" && chrome !== null ? (ref = chrome.proxy) != null ? ref.settings : void 0 : void 0) {
   proxySettings = {
     clearAsync: chromeApiPromisify(chrome.proxy.settings, 'clear'),
     setAsync: chromeApiPromisify(chrome.proxy.settings, 'set'),
     get: chrome.proxy.settings.get.bind(chrome.proxy.settings)
   };
 } else {
@@ -4646,22 +4646,22 @@
             watcher = ref1[j];
             results1.push(watcher(details));
           }
           return results1;
         };
       })(this);
-      if ((typeof chrome !== "undefined" && chrome !== null ? (ref1 = chrome.proxy) != null ? (ref2 = ref1.settings) != null ? ref2.onChange : void 0 : void 0 : void 0) != null) {
+      if ((typeof browser === "undefined" && typeof chrome !== "undefined" && chrome !== null ? (ref1 = chrome.proxy) != null ? (ref2 = ref1.settings) != null ? ref2.onChange : void 0 : void 0 : void 0) != null) {
         chrome.proxy.settings.onChange.addListener(this._proxyChangeListener);
       }
     }
     return this._proxyChangeWatchers.push(callback);
   };
   
   ChromeOptions.prototype.applyProfileProxy = function(profile, meta) {
     var ex, ref1, ref2;
-    if ((typeof chrome !== "undefined" && chrome !== null ? (ref1 = chrome.proxy) != null ? ref1.settings : void 0 : void 0) != null) {
+    if ((typeof browser === "undefined" && typeof chrome !== "undefined" && chrome !== null ? (ref1 = chrome.proxy) != null ? ref1.settings : void 0 : void 0) != null) {
       return this.applyProfileProxySettings(profile, meta);
     } else if ((typeof browser !== "undefined" && browser !== null ? (ref2 = browser.proxy) != null ? ref2.registerProxyScript : void 0 : void 0) != null) {
       return this.applyProfileProxyScript(profile, meta);
     } else {
       ex = new Error('Your browser does not support proxy settings!');
       return Promise.reject(ex);


--- js\omega.js 2018-01-27 21:15:56.000000000 +0800
+++ js\omega.js 2018-04-27 22:38:34.000000000 +0800
@@ -445,13 +445,13 @@
   
 (function() {
   var __hasProp = {}.hasOwnProperty;
   
   angular.module('omega').controller('MasterCtrl', function($scope, $rootScope, $window, $q, $modal, $state, profileColors, profileIcons, omegaTarget, $timeout, $location, $filter, getAttachedName, isProfileNameReserved, isProfileNameHidden, dispNameFilter, downloadFile) {
     var checkFormValid, diff, onOptionChange, showFirstRun, showFirstRunOnce, tr, type, _ref, _ref1;
-    if ((typeof chrome !== "undefined" && chrome !== null ? (_ref = chrome.proxy) != null ? _ref.settings : void 0 : void 0) == null) {
+    if ((typeof browser === "undefined" && typeof chrome !== "undefined" && chrome !== null ? (_ref = chrome.proxy) != null ? _ref.settings : void 0 : void 0) == null) {
       $scope.isExperimental = true;
       $scope.pacProfilesUnsupported = true;
     }
     tr = $filter('tr');
     $rootScope.options = null;
     omegaTarget.addOptionsChangeCallback(function(newOptions) {

如果是 Nightly 的话,关闭签名验证
user_pref("xpinstall.signatures.required", false);

自行修改扩展,暂时用着先。
好人好梦
火狐狸
火狐狸
  • UID26935
  • 注册日期2008-11-06
  • 最后登录2024-05-21
  • 发帖数254
  • 经验89枚
  • 威望0点
  • 贡献值24点
  • 好评度4点
  • 社区居民
16楼#
发布于:2018-04-28 12:36
你是一个人
上一页 下一页
游客

返回顶部