Skip to content

Commit

Permalink
Add more ban domain
Browse files Browse the repository at this point in the history
  • Loading branch information
dthung1602 committed May 19, 2022
1 parent e4d682b commit ae7e796
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,26 @@ async function migrationToVer1_1_0() {
})
}

const NEW_BAN_DOMAINS_2 = [
"mangas20.com",
"dreamjob",
"vyvymanga",
"mangadownloads.xyz"
]

async function migrationToVer1_2_0() {
let { banDomains } = await browser.storage.local.get(["banDomains"]);
banDomains = Array.from(new Set([...banDomains, ...NEW_BAN_DOMAINS_2]));
await browser.storage.local.set({
version: "1.2.0",
banDomains,
})
}

const migrations = [
["1.0", migrateToVer1],
["1.1.0", migrationToVer1_1_0],
["1.2.0", migrationToVer1_2_0],
];

browser.runtime.onInstalled.addListener(async () => {
Expand Down

0 comments on commit ae7e796

Please sign in to comment.