1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Add reload button to browser action

For #535
This commit is contained in:
kkapsner 2021-06-12 00:49:10 +02:00
parent cdfe72fada
commit 015350c385
6 changed files with 139 additions and 4 deletions

View file

@ -23,8 +23,14 @@
}
const currentURL = new URL(currentTab.url);
const reloadButton = document.getElementById("reload");
reloadButton.addEventListener("click", async function(){
await browser.tabs.reload(currentTab.id);
window.close();
});
const addonStatus = document.getElementById("addonStatus");
addonStatus.addEventListener("click", async function(){
reloadButton.classList.toggle("hidden");
if (isWhitelisted(currentURL)){
settingContainers.resetUrlValue("blockMode", currentURL);
if (settings.get("blockMode").startsWith("allow")){