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

Cleanup CanvasBlocker

once Firefox supports browser.runtime.onSuspend
This commit is contained in:
kkapsner 2020-01-23 15:36:32 +01:00
parent 9353f71455
commit 6c22788096
2 changed files with 19 additions and 8 deletions

View file

@ -45,13 +45,13 @@
let extensionSecret;
function computeExtensionSecret(){
function hashString(string){
return hashing(new Uint16Array(
string.split("").map(function(c){
return c.charCodeAt(0);
})
));
}
function hashString(string){
return hashing(new Uint16Array(
string.split("").map(function(c){
return c.charCodeAt(0);
})
));
}
const now = new Date();
const lastTenMinutes = Math.floor(now.getMinutes() / 10) * 10;
const nextRun = new Date(
@ -203,6 +203,7 @@
logging.message("register listener for messages from background script");
extension.message.on(function(data){
if (data["canvasBlocker-unload"]){
extension.revertProperties();
enabled = false;
}
if (