mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-05-25 09:13:27 +02:00
Added timing to settings loading test
This commit is contained in:
parent
1c64c5e06e
commit
140349b401
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Test</title>
|
<title>Test</title>
|
||||||
<script>
|
<script>
|
||||||
console.log("starting first fingerprint");
|
console.log(new Date(), "starting first fingerprint");
|
||||||
function fingerPrint(){
|
function fingerPrint(){
|
||||||
"use strict";var canvas = document.createElement("canvas");
|
"use strict";var canvas = document.createElement("canvas");
|
||||||
canvas.setAttribute("width", 220);
|
canvas.setAttribute("width", 220);
|
||||||
@ -50,9 +50,9 @@
|
|||||||
if (firstFingerprint){
|
if (firstFingerprint){
|
||||||
document.body.textContent = "context API not blocked";
|
document.body.textContent = "context API not blocked";
|
||||||
window.setTimeout(function(){
|
window.setTimeout(function(){
|
||||||
console.log("starting second fingerprint");
|
console.log(new Date(), "starting second fingerprint");
|
||||||
document.body.appendChild(document.createElement("br"));
|
document.body.appendChild(document.createElement("br"));
|
||||||
secondFingerprint = fingerPrint();
|
var secondFingerprint = fingerPrint();
|
||||||
if (firstFingerprint === secondFingerprint){
|
if (firstFingerprint === secondFingerprint){
|
||||||
hash(firstFingerprint).then(function(hash){
|
hash(firstFingerprint).then(function(hash){
|
||||||
document.body.appendChild(document.createTextNode("fingerprint consistent (" + hash + ") -> good!"));
|
document.body.appendChild(document.createTextNode("fingerprint consistent (" + hash + ") -> good!"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user