Skip to content

Commit

Permalink
Merge pull request #941 from mozilla/threads-url
Browse files Browse the repository at this point in the history
2.3.11 Hotfix Release Candidate
  • Loading branch information
maxxcrawford committed Jul 6, 2023
2 parents 2d6a0c4 + 248835a commit 90215c3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 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": "2.3.10",
"version": "2.3.11",
"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
4 changes: 3 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const FACEBOOK_DOMAINS = [

"metacareers.com", "meta.com", "metaque.st",

"novi.com"
"novi.com",

"threads.net"
];

const DEFAULT_SETTINGS = {
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.3.10",
"version": "2.3.11",

"incognito": "not_allowed",

Expand Down
4 changes: 2 additions & 2 deletions src/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const isSiteInContainer = async(panelId) => {

const activeRootDomain = await getActiveRootDomainFromBackground();

if (addedSitesList.includes(activeRootDomain)) {
if (addedSitesList && addedSitesList.includes(activeRootDomain)) {
return true;
}
};
Expand Down Expand Up @@ -345,7 +345,7 @@ document.addEventListener("DOMContentLoaded", async () => {
const storage = await browser.storage.local.get();
const currentPanel = storage.CURRENT_PANEL;

const onboarding = (currentPanel.includes("onboarding"));
const onboarding = (currentPanel && currentPanel.includes("onboarding"));
if (!onboarding) {
return buildPanel(currentPanel);
}
Expand Down
6 changes: 6 additions & 0 deletions test/features/add-domain-to-fbc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ describe("Add domain to Facebook Container", () => {
removeDomain: "example.com"
});

await sleep(300);

const [promise] = await background.browser.runtime.onMessage.addListener.yield({message: "what-sites-are-added"});
const sites = await promise;
expect(sites.includes("example.com")).to.be.false;
Expand All @@ -39,3 +41,7 @@ describe("Add domain to Facebook Container", () => {
});

});

async function sleep(ms = 100) {
return new Promise((resolve) => setTimeout(resolve, ms));
}

0 comments on commit 90215c3

Please sign in to comment.