mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 12:06:31 +02:00
parent
cdfe72fada
commit
015350c385
6 changed files with 139 additions and 4 deletions
|
@ -42,4 +42,23 @@ div {
|
|||
}
|
||||
#addonStatus.on {
|
||||
background-image: url(../icons/browserAction-CBon.svg);
|
||||
}
|
||||
|
||||
#reload {
|
||||
cursor: pointer;
|
||||
vertical-align: text-bottom;
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
margin-right: 0.25em;
|
||||
background-color: currentColor;
|
||||
mask-size: 100%;
|
||||
display: inline-block;
|
||||
mask-image: url(../icons/browserAction-reload.svg);
|
||||
position: absolute;
|
||||
top: calc(5px + 0.5em);
|
||||
right: 0.5em;
|
||||
}
|
||||
|
||||
#reload.hidden {
|
||||
display: none;
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<button id="addonStatus" class="undefined"></button>
|
||||
<span id="reload" class="hidden"></span>
|
||||
<div id="actions" class="stackedInputs"></div>
|
||||
<script src="../lib/require.js"></script>
|
||||
<script src="../lib/logging.js"></script>
|
||||
|
|
|
@ -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")){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue