mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-21 20:30:22 +01:00
parent
9a3745b366
commit
c6cf48c489
@ -12,6 +12,7 @@
|
||||
<div id="reload" class="hidden"></div>
|
||||
</div>
|
||||
<div id="actions" class="stackedInputs"></div>
|
||||
<div id="version" class="versionDisplay"></div>
|
||||
<script src="../lib/require.js"></script>
|
||||
<script src="../lib/logging.js"></script>
|
||||
<script src="../lib/extension.js"></script>
|
||||
|
@ -164,4 +164,8 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener("load", async function(){
|
||||
extension.displayVersion("version", 250);
|
||||
});
|
||||
}());
|
@ -235,5 +235,30 @@
|
||||
}
|
||||
};
|
||||
|
||||
scope.displayVersion = async function displayVersion(node, displayRefresh = false){
|
||||
if ("string" === typeof node){
|
||||
node = document.getElementById(node);
|
||||
}
|
||||
if (!node){
|
||||
throw "display node not found";
|
||||
}
|
||||
fetch(scope.getURL("manifest.json")).then(function(response){
|
||||
return response.json();
|
||||
}).then(function(manifest){
|
||||
node.textContent = "Version " + manifest.version;
|
||||
return manifest.version;
|
||||
}).catch(function(error){
|
||||
node.textContent = "Unable to get version: " + error;
|
||||
});
|
||||
|
||||
if (displayRefresh){
|
||||
// Workaround to hide the scroll bars
|
||||
window.setTimeout(function(){
|
||||
node.style.display = "none";
|
||||
node.style.display = "";
|
||||
}, displayRefresh);
|
||||
}
|
||||
};
|
||||
|
||||
Object.seal(scope);
|
||||
}());
|
@ -11,6 +11,7 @@
|
||||
<ul id="prints">
|
||||
<li>...</li>
|
||||
</ul>
|
||||
<div id="version" class="versionDisplay"></div>
|
||||
<script src="../lib/require.js"></script>
|
||||
<script src="../lib/logging.js"></script>
|
||||
<script src="../lib/extension.js"></script>
|
||||
|
@ -9,6 +9,10 @@
|
||||
const {parseErrorStack} = require("../lib/callingStack");
|
||||
const logging = require("../lib/logging");
|
||||
logging.setPrefix("page action script");
|
||||
|
||||
window.addEventListener("load", async function(){
|
||||
extension.displayVersion("version", 250);
|
||||
});
|
||||
|
||||
const domainNotification = require("./domainNotification");
|
||||
const Notification = require("./Notification");
|
||||
|
@ -4,6 +4,7 @@ Version 1.10:
|
||||
|
||||
new features:
|
||||
- added setting showPresetsOnInstallation to be able to not show the presets page upon installation
|
||||
- display version in page and browser action
|
||||
|
||||
fixes:
|
||||
- always protect about:blank
|
||||
@ -14,6 +15,7 @@ Version 1.10:
|
||||
- settings reset confirmation dialog was not properly visible in Firefox for Android
|
||||
- reload after changing the whitelist state in the browser action has to be done without cache
|
||||
- data URL blocking was not affected by when changing the whitelist state in the browser action
|
||||
- prevent unnecessary scroll bars in popups
|
||||
|
||||
known issues:
|
||||
- if a data URL is blocked the page action button does not appear
|
||||
|
@ -106,4 +106,12 @@ input[type=checkbox]:checked::before {
|
||||
box-sizing: border-box;
|
||||
cursor: initial;
|
||||
background-color: var(--input-background-color);
|
||||
}
|
||||
|
||||
.versionDisplay {
|
||||
text-align: right;
|
||||
font-size: 0.6em;
|
||||
opacity: 0.5;
|
||||
margin: 0.3em 0.5em 0.2em;
|
||||
clear: both;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user