diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js index 932c83c..640a71e 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/00-init-apis.js @@ -280,8 +280,10 @@ console.log('Extension started.'); const compareVersions = (a, b) => versionToInt(a) - versionToInt(b); + const ifFirefox = navigator.userAgent.toLowerCase().includes('firefox'); + let give; - const promise = new Promise((resolve) => { + const promise = !ifFirefox ? Promise.resolve() : new Promise((resolve) => { give = resolve; }); @@ -291,7 +293,7 @@ console.log('Extension started.'); give, }, platform: { - ifFirefox: navigator.userAgent.toLowerCase().includes('firefox'), + ifFirefox, }, version: { ifMini: false, diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/consent/index.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/consent/index.js index 343e3d7..b8fe6f6 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/consent/index.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/consent/index.js @@ -3,8 +3,10 @@ chrome.runtime.getBackgroundPage( (backgroundPage) => backgroundPage.apis.errorHandlers.installListenersOn( window, 'CONSENT', () => { - agreeBtn.onclick = () => + agreeBtn.onclick = () => { backgroundPage.apis.consent.give(); + window.close(); + } rejectBtn.onclick = () => chrome.management.uninstallSelf(); },