Skip to content

Commit

Permalink
scheme 7 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bella.tassone committed Aug 9, 2022
1 parent 0a0b6f2 commit 255158b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ class ThirdPartyData {
this.count = 0;
this.sCollection = collection(
db,
"users-scheme5",
"users-scheme7",
userDocId,
"Browser History",
docId,
"Third Party Requests Summary"
);
this.eCollection = collection(
db,
"users-scheme5",
"users-scheme7",
userDocId,
"Browser History",
docId,
Expand Down Expand Up @@ -183,7 +183,7 @@ export async function createUser(prolificID, schemeNumber) {
let latitude = crd.latitude ? crd.latitude : "unknown latitude";
let date = new Date();
// generate unique user document and storage the id into local storage
const newUserRef = doc(collection(db, "users-scheme5"));
const newUserRef = doc(collection(db, "users-scheme7"));
console.log("new user reference created: ", newUserRef);
chrome.storage.local.set(
{ USER_DOC_ID: newUserRef.id, UI_SCHEME: schemeNumber },
Expand Down Expand Up @@ -251,7 +251,7 @@ function addHistory(
GPC = "unset";
}
const newBrowserRef = doc(
collection(db, "users-scheme5", currentUserDocID, "Browser History")
collection(db, "users-scheme7", currentUserDocID, "Browser History")
);
const userData = {
Timestamp: Timestamp.fromDate(date),
Expand Down Expand Up @@ -286,18 +286,18 @@ export function addSettingInteractionHistory(
) {
let date = new Date();
const intDoc1 = doc(
collection(db, "users-scheme5", currentUserDocID, "Domain Interaction History")
collection(db, "users-scheme7", currentUserDocID, "Domain Interaction History")
);
const intDoc2 = doc(
collection(
db,
"users-scheme5",
"users-scheme7",
currentUserDocID,
"Privacy Configuration Interaction History"
)
);
const intDoc3 = doc(
collection(db, "users-scheme5", currentUserDocID, "Mute Interaction History")
collection(db, "users-scheme7", currentUserDocID, "Mute Interaction History")
);
if (subcollection === "Domain") {
const intData = {
Expand Down Expand Up @@ -346,7 +346,7 @@ export function updateDomains(domainsList) {
console.log("updating the domain list");
chrome.storage.local.get(["USER_DOC_ID"], function (result) {
if (result.USER_DOC_ID) {
const userRef = doc(db, "users-scheme5", result.USER_DOC_ID);
const userRef = doc(db, "users-scheme7", result.USER_DOC_ID);
updateDoc(userRef, {
"Domain List": domainsList,
});
Expand Down Expand Up @@ -433,7 +433,7 @@ export function addAd(adEvent) {
chrome.storage.local.get(["USER_DOC_ID"], function (result) {
const historyRef = collection(
db,
"users-scheme5",
"users-scheme7",
result.USER_DOC_ID,
"Browser History"
);
Expand All @@ -447,7 +447,7 @@ export function addAd(adEvent) {
querySnapshot.forEach((d) => {
const newBrowserRef = collection(
db,
"users-scheme5",
"users-scheme7",
result.USER_DOC_ID,
"Browser History",
d.id,
Expand All @@ -465,7 +465,7 @@ export function addAd(adEvent) {
// console.log(adEvent.targetTabId)
const docRef = doc(
db,
"users-scheme5",
"users-scheme7",
result.USER_DOC_ID,
"Browser History",
d.id,
Expand Down Expand Up @@ -716,7 +716,7 @@ chrome.tabs.onRemoved.addListener((tabId, removeInfo) => {

// Set the initial configuration of the extension
chrome.runtime.onInstalled.addListener(async function (object) {
let userScheme = 5;
let userScheme = 7;
chrome.storage.local.set(
{
MUTED: [false, undefined],
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GPC Privacy Choice",
"version": "2.7.0",
"version": "2.8.0",
"description": "GPC Privacy Choice is a research extension that studies usable privacy choice mechanisms on the web",
"permissions": [
"webRequest",
Expand Down

0 comments on commit 255158b

Please sign in to comment.