Skip to content

Commit

Permalink
Merge pull request #4 from mozilla/sign-out-of-facebook-on-install
Browse files Browse the repository at this point in the history
delete facebook.com cookies on install
  • Loading branch information
groovecoder committed Mar 21, 2018
2 parents 411357c + 45378b1 commit efc0317
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ let facebookCookieStoreId = null;
const FACEBOOK_CONTAINER_NAME = "Facebook";
const FACEBOOK_CONTAINER_COLOR = "blue";
const FACEBOOK_CONTAINER_ICON = "circle";
const FACEBOOK_DOMAIN = "facebook.com";
const FACEBOOK_COOKIE_URL = 'https://' + FACEBOOK_DOMAIN + '/';

browser.cookies.getAll({domain: FACEBOOK_DOMAIN}).then(cookies => {
for (let cookie of cookies) {
browser.cookies.remove({name: cookie.name, url: FACEBOOK_COOKIE_URL});
}
});

browser.contextualIdentities.query({name: FACEBOOK_CONTAINER_NAME}).then(contexts => {
if (contexts.length > 0) {
Expand Down

0 comments on commit efc0317

Please sign in to comment.