Skip to content

Commit

Permalink
add command to update whotracks.me data
Browse files Browse the repository at this point in the history
  • Loading branch information
remusao committed Jun 20, 2019
1 parent cdf7d6a commit e3ee06a
Show file tree
Hide file tree
Showing 4 changed files with 32,239 additions and 6,932 deletions.
15 changes: 5 additions & 10 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,14 @@ let cookieTable = {};

const parentTabMapping = {};

Object.keys(trackerData).forEach(e => {
trackerData[e].hosts.forEach(y => {
trackerDomains.push(y);
});
});


// Create a mapping of hostname to company name
const company_hostname_mapping = {}

Object.keys(trackerData).forEach(e => {
trackerData[e].hosts.forEach(y => {
company_hostname_mapping[y] = trackerData[e].parent;
Object.values(trackerData.trackers).forEach((info) => {
const company_name = info.company_id === null ? 'Unknown' : trackerData.companies[info.company_id].name;
info.domains.forEach(y => {
trackerDomains.push(y);
company_hostname_mapping[y] = company_name;
});
});

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"prestart": "npm run clean",
"lint": "web-ext lint",
"start": "concurrently 'npm run watch' 'web-ext run --source-dir . --firefox /usr/bin/firefox'",
"update-wtm": "curl 'https://whotracks.me/data/trackerdb.json' > whotracksme.json",
"prestart": "npm run clean"
},
"repository": {
Expand Down
1 change: 0 additions & 1 deletion scripts/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ function search(query, t) {


chrome.runtime.sendMessage(additionalInfo, e => {

// console.log(e.response);
// console.log(getWebsitesCount(e.response));
let countCompanies = e.response.ls.companies.length; // Placeholder.
Expand Down
Loading

0 comments on commit e3ee06a

Please sign in to comment.