From 27db7ce78d8832f9f1281cda163a3fa6cd1ad450 Mon Sep 17 00:00:00 2001 From: supernova <76390419+driedpampas@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:23:18 +0300 Subject: [PATCH] remove consent temporarily to confirm --- src/html/consent.html | 66 ------------------------------------------- src/html/consent.js | 26 ----------------- src/js/background.js | 20 ------------- 3 files changed, 112 deletions(-) delete mode 100644 src/html/consent.html delete mode 100644 src/html/consent.js diff --git a/src/html/consent.html b/src/html/consent.html deleted file mode 100644 index c789066c6..000000000 --- a/src/html/consent.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - FastForward - - - - - - - - -
-
-

Thank you for installing FastForward

-

- This extension collects the tab url when you choose to add a website to the whitelist, and temporarily processes the url of bypassed sites while navigating them. -

-

- Additionally, if the "Crowd Bypass" option is enabled, the extension may send some bypassed urls to our server to be processed and added to our database in accordance with our privacy policy. They are never shared. -

-

- If you consent to this data collection hit "Agree" to continue. Otherwise hit "Refuse" and the extension will be uninstalled. -

- - -
- - - diff --git a/src/html/consent.js b/src/html/consent.js deleted file mode 100644 index 2d284ce8d..000000000 --- a/src/html/consent.js +++ /dev/null @@ -1,26 +0,0 @@ -// Function to save consent status -async function saveConsentStatus(consentStatus) { - return browser.storage.local.set({ consentStatus: consentStatus }); -} - -// Function to get consent status -async function getConsentStatus() { - return new Promise((resolve) => { - browser.storage.local.get('consentStatus').then((result) => { - resolve(result.consentStatus); - }); - }); -} - -// Event listener for "Agree" button -document.querySelector('#agree').addEventListener('click', async function () { - console.log("Agree button clicked."); - await saveConsentStatus('consent-granted'); - window.location.href = 'options.html'; -}); - -// Event listener for "Refuse" button -document.querySelector('#refuse').addEventListener('click', async function () { - console.log("Uninstalling extension."); - browser.management.uninstallSelf(); -}); \ No newline at end of file diff --git a/src/js/background.js b/src/js/background.js index 1152b711b..ef101b399 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -1,25 +1,5 @@ import * as constants from './constants.js'; -const isFirefox = /Firefox/i.test(navigator.userAgent); - -// Check if the browser is Firefox -if (isFirefox) { - browser.runtime.onInstalled.addListener((details) => { - if (details.reason === 'install') { - browser.storage.local.get('consentStatus').then(function (data) { - const consentStatus = data.consentStatus; - if (consentStatus !== 'granted') { - browser.tabs.create({ - url: 'html/consent.html', - }); - return; - } - }); - return; - } - }); -} - const brws = typeof browser !== 'undefined' ? browser : chrome; const fetchDomains = ['crowd.fastforward.team', 'redirect-api.work.ink']; //only allow requests to these domains