Script for creating a Google container for Firefox
After migrating from Google Chrome to Firefox, I investigated all the privacy related extensions and options. Multi-Account Containers’s extension is awesome and I ended up using it for shopping and basic VPN proxy for specific websites. For Google sites, I was inspired by philsnow’s gist, that helps setup a Google-based container, similar to how the Facebook container works.
// @see https://gist.github.com/philsnow/322bea2867d401171ada1c2eb7a38c89
// Go to about:debugging#/runtime/this-firefox
const domains = [
'ggpht.com',
'google.com',
'google.ca',
'google.org',
'googleapis.com',
'g.co',
'gle',
'blogger.com',
'googleblog.com',
'blog.google',
'googleusercontent.com',
'googlesource.com',
'google.org',
'google.net',
'466453.com',
'gooogle.com',
'gogle.com',
'ggoogle.com',
'gogole.com',
'goolge.com',
'googel.com',
'googlee.com',
'googil.com',
'googlr.com',
'elgoog.im',
'ai.google',
'com.google',
'about.google',
'registry.google',
'google',
'gstatic.com',
'goog',
'googleplex.com',
'like.com',
'keyhole.com',
'panoramio.com',
'picasa.com',
'urchin.com',
'igoogle.com',
'foofle.com',
'froogle.com',
'localguidesconnect.com',
'googlemail.com',
'googleanalytics.com',
'google-analytics.com',
'googletagmanager.com',
'googlecode.com',
'googlesource.com',
'googledrive.com',
'googlearth.com',
'googleearth.com',
'googlemaps.com',
'googlepagecreator.com',
'googlescholar.com',
'advertisercommunity.com',
'thinkwithgoogle.com',
'googlegroups.com',
'youtube.com',
'youtu.be',
'yt.be',
'ytimg.com',
'youtube-nocookie.com',
'youtubegaming.com',
'youtubeeducation.com',
'youtube',
'doubleclickbygoogle.com',
'feedburner.com',
'doubleclick.com',
'doubleclick.net',
'adwords.com',
'adsense.com',
'admob.com',
'advertisercommunity.com',
'googlesyndication.com',
'googlecommerce.com',
'googlebot.com',
'googleapps.com',
'googleadservices.com',
'gmodules.com',
'googl.com',
'1e100.net',
'domains.google',
'gv.com',
'googletraveladservices.com',
'madewithcode.com',
'design.google',
'wellbeing.google',
'gallery.io',
'domains.google',
'material.io',
'getmdl.io',
'android.com',
'chromium.org',
'cobrasearch.com',
'chromecast.com',
'chrome.com',
'chromebook.com',
'madewithcode.com',
'whatbrowser.org',
'withgoogle.com',
'web.dev',
'google.dev',
'pub.dev',
'flutter.dev',
'dart.dev',
'grasshopper.app',
'accounts.google.com',
'ads.google.com',
'adsense.google.com',
'analytics.google.com',
'answers.google.com',
'apps.google.com',
'artsandculture.google.com',
'books.google.com',
'calendar.google.com',
'chat.google.com',
'chrome.google.com',
'classroom.google.com',
'cloud.google.com',
'code.google.com',
'contacts.google.com',
'crowdsource.google.com',
'datacompute.google.com',
'developers.google.com',
'docs.google.com',
'drive.google.com',
'duo.google.com',
'earth.google.com',
'edu.google.com',
'files.google.com',
'finance.google.com',
'firebase.google.com',
'fonts.google.com',
'fonts.googleapis.com',
'groups.google.com',
'hangouts.google.com',
'images.google.com',
'lh3.google.com',
'lens.google.com',
'maps.google.com',
'meet.google.com',
'myaccount.google.com',
'news.google.com',
'one.google.com',
'opensource.google.com',
'photos.google.com',
'picasa.google.com',
'play.google.com',
'podcasts.google.com',
'scholar.google.com',
'search.google.com',
'sites.google.com',
'stadia.google.com',
'store.google.com',
'support.google.com',
'takeout.google.com',
'translate.google.com',
'videos.google.com',
'workspace.google.com',
'www.google.com',
'www.google.ca',
];
(async () => {
obj = Object(await browser.storage.local.get('siteContainerMap@@_mail.google.com'));
for (let domain of domains) {
obj[`siteContainerMap@@_${domain}`] = obj['siteContainerMap@@_mail.google.com'];
}
await browser.storage.local.set(obj);
})();