mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-24 13:50:50 +01:00
2f6ca07bba
For #577
28 lines
706 B
JavaScript
28 lines
706 B
JavaScript
/* globals testAPI, canvasAPI*/
|
|
const addLine = function(){
|
|
"use strict";
|
|
|
|
const output = document.getElementById("results");
|
|
return function(text){
|
|
const line = document.createElement("div");
|
|
line.textContent = text;
|
|
output.appendChild(line);
|
|
};
|
|
}();
|
|
|
|
addLine("window name at start: " + window.name);
|
|
window.name = "CanvasBlocker CSP test";
|
|
addLine("window name after set: " + window.name);
|
|
(async function(){
|
|
"use strict";
|
|
|
|
const hashValue = await testAPI.hash(canvasAPI.fingerprint(window).url);
|
|
addLine("canvas hash: " + hashValue);
|
|
}());
|
|
|
|
document.getElementById("reloadWith304").addEventListener("click", function(){
|
|
"use strict";
|
|
|
|
document.cookie = "304=1";
|
|
location.reload();
|
|
}); |