src
├── assets # Static images & files
├── background # Manages the background script processes
│ ├── analysis
│ │ ├── analysis-listeners.js
│ │ └── analysis.js
│ ├── protection
│ │ ├── background.js
│ │ ├── cookiesOnInstall.js
│ │ ├── listeners-chrome.js
│ │ ├── listeners-firefox.js
│ │ ├── protection.js
│ │ └── protection-ff.js
│ ├── control.js
│ ├── cookiesIAB.js
│ ├── storage.js
│ └── storageCookies.js
├── common # Manages header sending and rules
│ ├── csvGenerator.js
│ ├── editDomainlist.js
│ └── editRules.js
├── content-scripts # Runs processes on site on adds DOM signal
│ ├── injection
│ │ ├── gpc-dom.js
│ │ └── gpc-remove.js
│ ├── registration
│ │ ├── gpc-dom.js
│ │ └── gpc-remove.js
│ └── contentScript.js
├── data # Stores constant data (DNS signals, settings, etc.)
│ ├── cookie_list.js
│ ├── defaultSettings.js
│ ├── headers.js
│ ├── modes.js
│ ├── privacyFlags.js
│ └── regex.js
├── manifests # Stores manifests
│ ├── chrome
│ │ ├── manifest-dev.json
│ │ └── manifest-dist.json
│ ├── firefox
│ │ ├── manifest-dev.json
│ │ └── manifest-dist.json
├── options # Options page frontend
│ ├── components
│ │ ├── scaffold-component.html
│ │ └── util.js
│ ├── views
│ │ ├── about-view
│ │ │ ├── about-view.html
│ │ │ └── about-view.js
│ │ ├── analysis-view
│ │ │ ├── analysis-view.html
│ │ │ └── analysis-view.js
│ │ ├── domainlist-view
│ │ │ ├── domainlist-view.html
│ │ │ └── domainlist-view.js
│ │ ├── main-view
│ │ │ ├── main-view.html
│ │ │ └── main-view.js
│ │ └── settings-view
│ │ ├── settings-view.html
│ │ └── settings-view.js
│ ├── dark-mode.css
│ ├── options.html
│ ├── options.js
│ └──styles.css
├── popup # Popup page frontend
│ ├── popup.html
│ ├── popup.js
│ └── styles.css
├── rules # Manages universal rules
│ ├── gpc_exceptions_rules.json
│ └── universal_gpc_rules.json
└── theme # Contains darkmode
└── darkmode.js
The following folders have detailed descriptions further in the document.
src/background
src/common
src/content-scripts
src/data
src/options
src/popup
src/rules
src/theme
analysis
protection
control.js
cookiesIAB.js
storage.js
storageCookies.js
The background folder splits into the analysis
and protection
folders that build the respective modes.
analysis-listeners.js
analysis.js
Initializes the listeners for analysis mode using webRequest
and webNavigation
(links found below). This file only needs to deal with firefox listeners as analysis mode is not available on Chrome.
Contains all the logic and processes for running analysis mode. FetchUSPCookies();
is used to identify and save US Privacy cookies and fetchUSPAPIData();
uses the USPAPI query to check the US Privacy string. runAnalysis();
collects the US Privacy values and sends the GPC signal. haltAnalysis();
then rechecks the US Privacy values and removes the GPC signal, then allowing the US Privacy Values from before and after to be compared. logData();
then records the found data to local storage.
background.js
cookiesOnInstall.js
listeners-chrome.js
listeners-firefox.js
protection.js
protection-ff.js
Initializes the protection mode cookies and listeners.
Sets opt-out cookies for specific sites.
Creates listeners for chrome and firefox, respectively.
Manages the domain list with functions like logData();
, updateDomainlistAndSignal();
, pullToDomainlistCache();
, syncDomainlists();
. Also responsible for supplying the popup with the proper information with dataToPopup();
. Also creates listeners to watch the popup for domain list changes.
Manages the domain list for firefox.
Uses analysis.js
and protection.js
to switch between modes.
Is responsible for setting valid IAB cookies.
Handles storage uploads and downloads.
Handles cookie creation and deletion.
csvGenerator.js
editDomainlist.js
editRules.js
This folder holds common internal API's to be used throughout the extension.
Creates a CSV file of the users local collected data.
Is an internal API to be used for editing a users domain list.
Is an internal API to be used for editing rules that allow us to send the GPC header.
injection
registration
contentScript.js
This folder contains our main content script and methods for injecting the GPC signal into the DOM.
gpc-dom.js
gpc-remove.js
gpc-dom.js
the GPC DOM signal and gpc-remove.js
removes it.
gpc-dom.js
gpc-remove.js
These files inject injection/gpc-dom.js
and injection/gpc-remove.js
into the page using a static script. (Based on this stack overflow thread)
This runs on every page and sends information to signal background processes.
cookies.js
defaultSettings.js
headers.js
modes.js
privacyFlags.js
regex.js
This folder contains static data.
Contains opt out cookies that are set on install.
Contains the default OptMeowt settings.
Contains the default headers to be attached to online requests.
Contains the modes for OptMeowt.
Contains all privacy flags for analysis
Contains regular expressions for finding "do not sell" links and relevant cookies
chrome
firefox
Contains the extension manifests
manifest-dev.json
manifest-dist.json
Contains the development and distribution manifests for chrome
manifest-dev.json
manifest-dist.json
Contains the development and distribution manifests for firefox
components
views
dark-mode.css
options.html
This folder contains all of the frontend code
scaffold-component.html
util.js
This folder contains the basic layout of every options page and helper functions to help render the pages.
about-view
analysis-view
domainlist-view
main-view
settings-view
Contains all frontend and implementation of the settings pages.
about-view.html
about-view.js
Builds the "about" page
analysis-view.html
analysis-view.js
Builds the analysis list page
domainlist-view.html
domainlist-view.js
Builds the domain list page
main-view.html
main-view.js
Builds the main options page
settings-view.html
settings-view.js
Builds the settings page
Contains the dark-mode styles for OptMeowt.
Is the entry point for the main options page.
Contains the basic styles for OptMeowt.
popup.html
popup.js
styles.css
Contains the frontend and implementation for the OptMeowt popup.
gpc_exception_rules.json
universal_gpc_rules.json
Contains rule framework for sending GPC headers to sites.
darkmode.js
Contains the dark mode functionality.
Links to APIs:
Chrome: webRequest and webNavigation
Firefox: webRequest and webNavigation