Small refining #292

This commit is contained in:
ManeraKai 2022-05-31 01:54:25 +03:00
parent 2b048f6af1
commit 854ef6115c
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ browser.runtime.onInstalled.addListener(
async details => { async details => {
// if (details.reason == 'install') { // if (details.reason == 'install') {
if (details.reason == 'install' || details.reason == "update") { if (details.reason == 'install' || details.reason == "update") {
browser.tabs.create({ url: browser.extension.getURL("/pages/background/reset_warning.html") }); if (details.reason == "update") browser.tabs.create({ url: browser.extension.getURL("/pages/background/reset_warning.html") });
fetch('/instances/blocklist.json').then(response => response.text()).then(async data => { fetch('/instances/blocklist.json').then(response => response.text()).then(async data => {
await browser.storage.local.clear(); await browser.storage.local.clear();
await browser.storage.local.set({ cloudflareList: JSON.parse(data) }) await browser.storage.local.set({ cloudflareList: JSON.parse(data) })