Skip to content

Commit

Permalink
scheme 6 testing #245 (#246)
Browse files Browse the repository at this point in the history
Co-authored-by: bella.tassone <isabellatassone@billericak12.com>
  • Loading branch information
bella-tassone and bella.tassone authored Jul 14, 2022
1 parent 30e97d5 commit 6ade404
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ class ThirdPartyData {
this.count = 0;
this.sCollection = collection(
db,
"users-scheme5",
"users-scheme6",
userDocId,
"Browser History",
docId,
"Third Party Requests Summary"
);
this.eCollection = collection(
db,
"users-scheme5",
"users-scheme6",
userDocId,
"Browser History",
docId,
Expand Down Expand Up @@ -179,7 +179,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-scheme6"));
console.log("new user reference created: ", newUserRef);
chrome.storage.local.set(
{ USER_DOC_ID: newUserRef.id, UI_SCHEME: schemeNumber },
Expand Down Expand Up @@ -247,7 +247,7 @@ function addHistory(
GPC = "unset";
}
const newBrowserRef = doc(
collection(db, "users-scheme5", currentUserDocID, "Browser History")
collection(db, "users-scheme6", currentUserDocID, "Browser History")
);
const userData = {
Timestamp: Timestamp.fromDate(date),
Expand Down Expand Up @@ -282,18 +282,18 @@ export function addSettingInteractionHistory(
) {
let date = new Date();
const intDoc1 = doc(
collection(db, "users-scheme5", currentUserDocID, "Domain Interaction History")
collection(db, "users-scheme6", currentUserDocID, "Domain Interaction History")
);
const intDoc2 = doc(
collection(
db,
"users-scheme5",
"users-scheme6",
currentUserDocID,
"Privacy Configuration Interaction History"
)
);
const intDoc3 = doc(
collection(db, "users-scheme5", currentUserDocID, "Mute Interaction History")
collection(db, "users-scheme6", currentUserDocID, "Mute Interaction History")
);
if (subcollection === "Domain") {
const intData = {
Expand Down Expand Up @@ -342,7 +342,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-scheme6", result.USER_DOC_ID);
updateDoc(userRef, {
"Domain List": domainsList,
});
Expand Down Expand Up @@ -429,7 +429,7 @@ export function addAd(adEvent) {
chrome.storage.local.get(["USER_DOC_ID"], function (result) {
const historyRef = collection(
db,
"users-scheme5",
"users-scheme6",
result.USER_DOC_ID,
"Browser History"
);
Expand All @@ -443,7 +443,7 @@ export function addAd(adEvent) {
querySnapshot.forEach((d) => {
const newBrowserRef = collection(
db,
"users-scheme5",
"users-scheme6",
result.USER_DOC_ID,
"Browser History",
d.id,
Expand All @@ -461,7 +461,7 @@ export function addAd(adEvent) {
// console.log(adEvent.targetTabId)
const docRef = doc(
db,
"users-scheme5",
"users-scheme6",
result.USER_DOC_ID,
"Browser History",
d.id,
Expand Down Expand Up @@ -711,7 +711,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 = 6;
chrome.storage.local.set(
{
MUTED: [false, undefined],
Expand Down

0 comments on commit 6ade404

Please sign in to comment.