From e106a826fd8b91617d3784491dd63194fd1ce09b Mon Sep 17 00:00:00 2001 From: Ame <76390419+driedpampas@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:15:19 +0300 Subject: [PATCH] Revert "ignore these changes if they seem random tysm" This reverts commit efcd37084c32c550634b01fbe68333ad22582ef4. --- src/html/consent.html | 66 +++++++++++++++++++++++++++++++++++++++++++ src/html/consent.js | 26 +++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 src/html/consent.html create mode 100644 src/html/consent.js diff --git a/src/html/consent.html b/src/html/consent.html new file mode 100644 index 000000000..c789066c6 --- /dev/null +++ b/src/html/consent.html @@ -0,0 +1,66 @@ + + + + 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 new file mode 100644 index 000000000..2d284ce8d --- /dev/null +++ b/src/html/consent.js @@ -0,0 +1,26 @@ +// 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