Skip to content

Commit

Permalink
Merge pull request #461 from mozilla/2.0.1
Browse files Browse the repository at this point in the history
2.0.1 Patch Release
  • Loading branch information
lesleyjanenorton authored Jul 5, 2019
2 parents 55d483c + 854f6a1 commit 813281b
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 37 deletions.
45 changes: 13 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "contain-facebook",
"version": "1.9.2",
"version": "2.0.1",
"description": "Facebook Container isolates your Facebook activity from the rest of your web activity in order to prevent Facebook from tracking you outside of the Facebook website via third party cookies. ",
"main": "background.js",
"scripts": {
Expand Down
47 changes: 44 additions & 3 deletions src/_locales/id/messages.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
{
"extensionDescription": {
"message": "Kontainer Facebook mengisolasi aktivitas Facebook Anda dari aktivitas web Anda yang lain untuk mencegah Facebook melacak Anda di luar situs web Facebook melalui kuki pihak ketiga.",
"message": "Facebook Container mengisolasi aktivitas Facebook Anda dari aktivitas web Anda yang lain untuk mencegah Facebook melacak Anda di luar situs web Facebook melalui kuki pihak ketiga.",
"description": "Description of the extension. DO NOT TRANSLATE \"Facebook Container\"."
},
"in-fbc-subhead": {
"message": "$URL$ ada dalam Facebook Container.",
"description": "This is shown at the top of the panel pop-up when the user is on a Facebook website, which has been automatically opened into Facebook Container. DO NOT TRANSLATE \"Facebook Container\".",
"placeholders": {
"url": {
"content": "$1",
"example": "www.facebook.com"
}
}
},
"in-fbc-p1": {
"message": "Facebook sekarang dapat melacak Anda di situs ini. Untuk menghapus situs ini dari Facebook Container, pilih Situs yang Dibolehkan dalam Facebook Container lalu hapus dari daftar."
},
"on-facebook-p1": {
"message": "Ikon ini muncul dalam bilah alamat Firefox ketika Anda mengunjungi situs yang dimiliki oleh Facebook atau situs yang telah Anda tambahkan ke Facebook Container.",
"description": "This is shown in the body of the panel pop-up when the user is on a Facebook website, which has been automatically opened into Facebook Container. DO NOT TRANSLATE \"Facebook Container\"."
},
"on-facebook-p2": {
"message": "Agar bisa berfungsi, situs ini perlu mengakses identitas Facebook Anda (atau mengetahui siapa Anda). Ini juga berarti bahwa Facebook dapat melacak semua yang Anda lakukan di situs ini.",
"description": "This is shown in the body of the panel pop up when the user is on Facebook."
},
"notOnFacebookHeader": {
"message": "$URL$ tidak ada dalam Kontainer Facebook.",
"description": "This is shown at the top of the panel pop-up when the user is NOT on a Facebook website, which has been automatically opened OUTSIDE Facebook Container. DO NOT TRANSLATE \"Facebook Container\".",
Expand All @@ -14,13 +35,21 @@
}
},
"notOnFacebookText": {
"message": "Situs ini berada di luar Kontainer Facebook. Ini membuat Facebook semakin sulit melacak Anda di web.",
"message": "Situs ini berada di luar Facebook Container. Ini membuat Facebook semakin sulit melacak Anda di web.",
"description": "This is shown in the body of the panel pop-up when the user is NOT on a Facebook website, which has been automatically opened OUTSIDE Facebook Container. DO NOT TRANSLATE \"Facebook Container\"."
},
"onUnknownSiteHeader": {
"message": "Situs ini tidak ada dalam Kontainer Facebook.",
"message": "Situs ini tidak ada dalam Facebook Container.",
"description": "This is shown at the top of the panel pop-up when the user is on an \"unknown\" website - e.g., about:newtab. DO NOT TRANSLATE \"Facebook Container\"."
},
"facebookContainer": {
"message": "Facebook Container",
"description": "This is the name of the extension, and appears at the top of all onboarding panels. Please do not translate \"Facebook Container\"."
},
"onboarding1-subhead": {
"message": "Menggunakan Facebook Container",
"description": "This is the subhead of onboarding panel 1. Please do not translate \"Facebook Container\""
},
"btn-allow": {
"message": "Izinkan",
"description": "This is a button to allows users to whitelist the domain, adding it to the Facebook container."
Expand Down Expand Up @@ -49,10 +78,18 @@
"message": "Pelajari lebih lanjut",
"description": "This is a link that opens a page with more information about Facebook Container."
},
"how-fbc-works": {
"message": "Bagaimana Facebook Container Bekerja",
"description": "This is a button that opens the Facebook Container onboarding flow."
},
"trackers-detected-subhead": {
"message": "Kami melindungi Anda dari Facebook.",
"description": "This is a subhead, and it means that the add on has protected the user by blocking Facebook trackers."
},
"sites-added-subhead": {
"message": "Situs yang Diizinkan dalam Facebook Container",
"description": "This is a panel subhead."
},
"no-sites-added": {
"message": "Tidak Ada",
"description": "This message is shown beneath the 'SITES YOU’VE ALLOWED' list header when no sites have been added to the contaner."
Expand All @@ -65,6 +102,10 @@
"message": "Hapus",
"description": ""
},
"remove-site-subhead": {
"message": "Hapus situs dari Facebook Container?",
"description": ""
},
"inPageUI-tooltip-prompt-p1": {
"message": "Izinkan Facebook melacak Anda di sini?",
"description": ""
Expand Down
20 changes: 20 additions & 0 deletions src/_locales/sl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"message": "Na Facebooku in straneh v Facebook Containerju",
"description": "This is shown at the top of the panel pop-up when the user is on a Facebook website, which has been automatically opened into Facebook Container. DO NOT TRANSLATE \"Facebook Container\"."
},
"on-facebook-p1": {
"message": "Ta ikona se pojavi v Firefoxovi naslovni vrstici, ko obiščete Facebookove strani ali strani, ki ste jih dodali v Facebook Container.",
"description": "This is shown in the body of the panel pop-up when the user is on a Facebook website, which has been automatically opened into Facebook Container. DO NOT TRANSLATE \"Facebook Container\"."
},
"on-facebook-p2": {
"message": "Te strani potrebujejo dostop do vaše identitete na Facebooku (vedeti morajo, kdo ste), da bi lahko delovale. To pomeni tudi, da lahko Facebook sledi vaši dejavnosti na teh straneh.",
"description": "This is shown in the body of the panel pop up when the user is on Facebook."
Expand Down Expand Up @@ -78,6 +82,10 @@
"message": "Kako vem, da Facebook Container deluje?",
"description": "This is the subhead for the third onboarding panel."
},
"onboarding3-p1": {
"message": "Gumbi, ki vam omogočajo všečkanje in deljenje vsebine na Facebooku, ter omogočajo prijavo z računom Facebook, vsebujejo sledilce. Facebook Container zavrača te sledilce in prikaže ikono ograje, kjer so bili sledilci odstranjeni.",
"description": "This is the first paragraph of the third onboarding panel."
},
"onboarding3-img": {
"message": "Ta slika prikazuje, kako se ikona ograje Facebook Containerja prikaže ob Facebookovem gumbu Všeč mi je.",
"description": "This is alternative text for the image shown in the third onboarding panel."
Expand Down Expand Up @@ -166,6 +174,14 @@
"message": "Odstranim stran iz Facebook Containerja?",
"description": ""
},
"remove-site-p1": {
"message": "Če odstranite to stran iz Facebook Containerja, možnost prijave z računom Facebook ne bo več delovala, Facebookovi sledilni piškotki pa bodo izbrisani.",
"description": ""
},
"remove-site-p2": {
"message": "Če želite ponovno uporabiti možnost prijave z računom Facebook, boste morali stran dodati nazaj v Facebook Container.",
"description": ""
},
"inPageUI-tooltip-button-share": {
"message": "Facebook Container je onemogočil ta gumb in preprečil Facebooku, da bi spremljal vaš obisk te strani.",
"description": ""
Expand All @@ -178,6 +194,10 @@
"message": "Dovolite Facebooku, da vas spremlja na tej strani?",
"description": ""
},
"inPageUI-tooltip-prompt-p2": {
"message": "Če želite uporabiti možnost prijave z računom Facebook, bo Facebook lahko spremljal vašo dejavnost na tej strani. To lahko Facebooku pomaga, da si ustvari popolnejšo sliko o vašem spletnem življenju.",
"description": ""
},
"inPageUI-tooltip-prompt-checkbox": {
"message": "Ne prikazuj ponovno",
"description": ""
Expand Down
13 changes: 13 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const FACEBOOK_DOMAINS = [

"atdmt.com",

"workplace.com", "www.workplace.com", "work.facebook.com",

"onavo.com",
"oculus.com", "oculusvr.com", "oculusbrand.com", "oculusforbusiness.com"
];
Expand Down Expand Up @@ -274,13 +276,23 @@ function isFacebookURL (url) {
return false;
}

// TODO: Consider users if accounts.spotify.com already in FBC
async function supportSiteSubdomainCheck (url) {
if (url === "accounts.spotify.com") {
await addDomainToFacebookContainer("https://www.spotify.com");
await addDomainToFacebookContainer("https://open.spotify.com");
}
return;
}

// TODO: refactor parsedUrl "up" so new URL doesn't have to be called so much
// TODO: refactor fbcStorage "up" so browser.storage.local.get doesn't have to be called so much
async function addDomainToFacebookContainer (url) {
const parsedUrl = new URL(url);
const fbcStorage = await browser.storage.local.get();
fbcStorage.domainsAddedToFacebookContainer.push(parsedUrl.host);
await browser.storage.local.set({"domainsAddedToFacebookContainer": fbcStorage.domainsAddedToFacebookContainer});
await supportSiteSubdomainCheck(parsedUrl.host);
}

async function removeDomainFromFacebookContainer (domain) {
Expand All @@ -290,6 +302,7 @@ async function removeDomainFromFacebookContainer (domain) {
await browser.storage.local.set({"domainsAddedToFacebookContainer": fbcStorage.domainsAddedToFacebookContainer});
}

// TODO: Add PSL Subdomain Check against current list
async function isAddedToFacebookContainer (url) {
const parsedUrl = new URL(url);
const fbcStorage = await browser.storage.local.get();
Expand Down
7 changes: 7 additions & 0 deletions src/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ const LOGIN_PATTERN_DETECTION_SELECTORS = [
"[title='Log in with Facebook']",
"[class*='FacebookConnectButton']",
"[class*='js-facebook-login']", // kickstarter
".signup__button.button--facebook", // massdrop
"[class*='signinInitialStep_fbButton']", // soundcloud
"[id*='signin_fb_btn']", // Ebay
"[class*='facebookV2Login']", // emag.ro
"[class*='btn-facebook-signin']", // estadao.com.br
"[class*='signup-provider-facebook']", // Fandom
".socialContainer-0-131 .mainFacebook-0-150", // Honey
"[class*='facebook_login_click']", // Hi5
"[class*='facebook-signup-button']", // Strava
"[class*='facebook-connect-button']", // Twitch
Expand All @@ -21,6 +26,7 @@ const LOGIN_PATTERN_DETECTION_SELECTORS = [
"[data-oauthserver*='facebook']", // Stackoverflow
"[id*='facebook_connect_button']", // Quora
"[data-action*='facebook-auth']", //Medium
"[data-login-with-facebook='']", // etsy
"[data-destination*='facebook']",
"[data-partner*='facebook']", // AliExpress
".social-login .button--facebook", // noovie.com
Expand Down Expand Up @@ -48,6 +54,7 @@ const SHARE_PATTERN_DETECTION_SELECTORS = [
"[aria-label*='share on facebook']", // MSN
"[data-tracking*='facebook|share']", // football.london
"[class*='facebookShare']", // Producthunt share
"[class*='social-tray__link--facebook']", // Vice
".post-action-options + .right > .social-icon.icon-f", // Imgur share
"[title='Share on Facebook']" // Medium
];
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Facebook Container",
"version": "2.0",
"version": "2.0.1",

"default_locale": "en",

Expand Down

0 comments on commit 813281b

Please sign in to comment.