src
├── assets # Static images & files
├── background # Manages the background script processes
│ ├── protection
│ │ ├── background.js
│ │ ├── cookiesOnInstall.js
│ │ ├── listeners-chrome.js
│ │ ├── listeners-firefox.js
│ │ ├── protection-ff.js
│ │ └── protection.js
│ ├── control.js
│ ├── cookiesIAB.js
│ ├── storage.js
│ └── storageCookies.js
├── common # Manages header sending and rules
│ ├── editDomainlist.js
│ └── editRules.js
├── content-scripts # Runs processes on site on adds DOM signal
│ ├── injection
│ │ └── gpc-dom.js
│ ├── registration
│ │ └── gpc-dom.js
│ └── contentScript.js
├── data # Stores constant data (DNS signals, settings, etc.)
│ ├── cookie_list.js
│ ├── defaultSettings.js
│ ├── headers.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
│ │ ├── 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
test
└── background
├── gpc.test.js
├── isValidSignalIAB.test.js
├── makeCookieIAB.test.js
├── pruneCookieIAB.test.js
└── pruneIABtest.js
The following source folders have detailed descriptions further in the document.
background
common
content-scripts
data
manifests
options
popup
rules
theme
protection
control.js
cookiesIAB.js
storage.js
storageCookies.js
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 protection.js
to turn the extension on and off.
Is responsible for setting valid IAB cookies.
Handles storage uploads and downloads.
Handles cookie creation and deletion.
editDomainlist.js
editRules.js
This folder holds common internal API's to be used throughout the extension.
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-dom.js
injects the DOM signal.
gpc-dom.js
This file injects injection/gpc-dom.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.
cookie_list.js
defaultSettings.js
headers.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 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
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
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