1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-05 12:57:50 +02:00

Added timing to settings loading test

This commit is contained in:
kkapsner 2017-12-18 23:17:55 +01:00
parent 1c64c5e06e
commit 140349b401

View File

@ -3,7 +3,7 @@
<head>
<title>Test</title>
<script>
console.log("starting first fingerprint");
console.log(new Date(), "starting first fingerprint");
function fingerPrint(){
"use strict";var canvas = document.createElement("canvas");
canvas.setAttribute("width", 220);
@ -50,9 +50,9 @@
if (firstFingerprint){
document.body.textContent = "context API not blocked";
window.setTimeout(function(){
console.log("starting second fingerprint");
console.log(new Date(), "starting second fingerprint");
document.body.appendChild(document.createElement("br"));
secondFingerprint = fingerPrint();
var secondFingerprint = fingerPrint();
if (firstFingerprint === secondFingerprint){
hash(firstFingerprint).then(function(hash){
document.body.appendChild(document.createTextNode("fingerprint consistent (" + hash + ") -> good!"));