summaryrefslogtreecommitdiffstats
path: root/src/js/constants.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 19:47:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 19:47:39 +0000
commit8d13bdc6cac0e20c43c6f909fc0208774b9c5c84 (patch)
tree5fd46925c6b4a881c9208772ed8e5cc0588bc164 /src/js/constants.js
parentInitial commit. (diff)
downloadprivacybadger-8d13bdc6cac0e20c43c6f909fc0208774b9c5c84.tar.xz
privacybadger-8d13bdc6cac0e20c43c6f909fc0208774b9c5c84.zip
Adding upstream version 2020.10.7.upstream/2020.10.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/js/constants.js')
-rw-r--r--src/js/constants.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/js/constants.js b/src/js/constants.js
new file mode 100644
index 0000000..5a77d02
--- /dev/null
+++ b/src/js/constants.js
@@ -0,0 +1,54 @@
+/*
+ * This file is part of Privacy Badger <https://www.eff.org/privacybadger>
+ * Copyright (C) 2014 Electronic Frontier Foundation
+ *
+ * Privacy Badger is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Privacy Badger is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Badger. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+require.scopes.constants = (function() {
+
+var exports = {
+
+ // Tracking status constants
+ NO_TRACKING: "noaction",
+ ALLOW: "allow",
+ BLOCK: "block",
+ COOKIEBLOCK: "cookieblock",
+ DNT: "dnt",
+ USER_ALLOW: "user_allow",
+ USER_BLOCK: "user_block",
+ USER_COOKIEBLOCK: "user_cookieblock",
+
+ // URLS
+ DNT_POLICIES_URL: "https://www.eff.org/files/dnt-policies.json",
+ DNT_POLICIES_LOCAL_URL: chrome.runtime.getURL('data/dnt-policies.json'),
+ YELLOWLIST_URL: "https://www.eff.org/files/cookieblocklist_new.txt",
+ YELLOWLIST_LOCAL_URL: chrome.runtime.getURL('data/yellowlist.txt'),
+ SEED_DATA_LOCAL_URL: chrome.runtime.getURL('data/seed.json'),
+
+ // The number of 1st parties a 3rd party can be seen on
+ TRACKING_THRESHOLD: 3,
+ MAX_COOKIE_ENTROPY: 12,
+
+ DNT_POLICY_CHECK_INTERVAL: 1000, // one second
+};
+
+exports.BLOCKED_ACTIONS = new Set([
+ exports.BLOCK,
+ exports.USER_BLOCK,
+ exports.COOKIEBLOCK,
+ exports.USER_COOKIEBLOCK,
+]);
+
+return exports;
+})();