1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-11-11 07:38:58 +01:00
CanvasBlocker/test/cspTest.js
2020-01-06 15:15:04 +01:00

21 lines
557 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);
}());