From 2944d4bcfba41c879441ccb4d420354a5b56f946 Mon Sep 17 00:00:00 2001 From: Jocelyn Wang Date: Tue, 31 Oct 2023 11:18:37 -0400 Subject: [PATCH] remove regex.js (issue-#434) --- src/background/protection/protection-ff.js | 1 - src/background/protection/protection.js | 1 - src/data/regex.js | 33 ---------------------- 3 files changed, 35 deletions(-) delete mode 100644 src/data/regex.js diff --git a/src/background/protection/protection-ff.js b/src/background/protection/protection-ff.js index 03de94a..c8bb79b 100644 --- a/src/background/protection/protection-ff.js +++ b/src/background/protection/protection-ff.js @@ -18,7 +18,6 @@ import { initIAB } from "../cookiesIAB.js"; import { initCookiesPerDomain } from "./cookiesOnInstall.js"; import { initCookiesOnInstall } from "./cookiesOnInstall.js"; import psl from "psl"; -import { addDynamicRule, deleteDynamicRule } from "../../common/editRules.js"; /******************************************************************************/ /******************************************************************************/ diff --git a/src/background/protection/protection.js b/src/background/protection/protection.js index 4fefdb2..3b55f58 100644 --- a/src/background/protection/protection.js +++ b/src/background/protection/protection.js @@ -12,7 +12,6 @@ protection.js (1) Implements our per-site functionality for the background liste import { stores, storage } from "./../storage.js"; import { defaultSettings } from "../../data/defaultSettings.js"; -import { headers } from "../../data/headers.js"; import { enableListeners, disableListeners } from "./listeners-$BROWSER.js"; import { initIAB } from "../cookiesIAB.js"; import { initCookiesPerDomain } from "./cookiesOnInstall.js"; diff --git a/src/data/regex.js b/src/data/regex.js deleted file mode 100644 index 11bc448..0000000 --- a/src/data/regex.js +++ /dev/null @@ -1,33 +0,0 @@ -/* -Licensed per https://github.com/privacy-tech-lab/gpc-optmeowt/blob/main/LICENSE.md -privacy-tech-lab, https://privacytechlab.org/ -*/ - -/* -regex.js -================================================================================ -regex.js keeps track of all the regular expressions we will use throughout the -extension in multiple locations -*/ - -// This regex requires at least one of (do not|don't), (sell), & (information|info|data) -// OR a notice of the form "California Resident - Do Not Sell" -export const doNotSellPhrasing = new RegExp( - [ - /((California|CA).?Resident).{0,10}((Do.?Not|Don.?t).?Sell)|/, - /(Do.?Not|Don.?t).?Sell.?(My)?.?(Personal)?.?(Information|Info|Data)/, - ] - .map((r) => r.source) - .join(""), - "gmi" -); - -export const uspPhrasing = /(us(-|_|.)?privacy)/gim; -export const uspCookiePhrasing = /(us(-|_)?privacy)/gim; -export const uspCookiePhrasingList = ["us_privacy", "us-privacy", "usprivacy"]; - -// Do Not Sell - Cookie variations -export const cookiesPhrasing = new RegExp( - [/(us-?_?privacy)|/, /(OptanonConsent)/].map((r) => r.source).join(""), - "gmi" -);