mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 12:06:31 +02:00
test updates
This commit is contained in:
parent
717e1d3e3a
commit
0d0e3e30ec
16 changed files with 455 additions and 497 deletions
|
@ -1,15 +1,15 @@
|
|||
|
||||
var createLog = function(){
|
||||
const createLog = function(){
|
||||
"use strict";
|
||||
|
||||
var div = document.getElementById("log");
|
||||
const div = document.getElementById("log");
|
||||
|
||||
return function createLog(){
|
||||
var logDiv = document.createElement("div");
|
||||
const logDiv = document.createElement("div");
|
||||
logDiv.className = "log";
|
||||
div.appendChild(logDiv);
|
||||
return function createLine(str){
|
||||
var logLine = document.createElement("div");
|
||||
const logLine = document.createElement("div");
|
||||
logLine.className = "logLine";
|
||||
logDiv.appendChild(logLine);
|
||||
logLine.textContent = str;
|
||||
|
@ -20,7 +20,7 @@ var createLog = function(){
|
|||
};
|
||||
}();
|
||||
|
||||
var log = createLog();
|
||||
let log = createLog();
|
||||
|
||||
log("user agent equal between server and client: " + (
|
||||
document.getElementById("serverUserAgent").text === navigator.userAgent
|
||||
|
@ -29,26 +29,26 @@ log("user agent equal between server and client: " + (
|
|||
Object.keys(navigator.__proto__).sort().forEach(function(property){
|
||||
"use strict";
|
||||
|
||||
var value = navigator[property];
|
||||
const value = navigator[property];
|
||||
if ((typeof value) === "string"){
|
||||
log(property + ": " + value);
|
||||
}
|
||||
});
|
||||
|
||||
var section = document.createElement("h2");
|
||||
const section = document.createElement("h2");
|
||||
section.textContent = "Values in iFrame";
|
||||
document.getElementById("log").append(section);
|
||||
|
||||
log = createLog();
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
const iframe = document.createElement("iframe");
|
||||
document.body.appendChild(iframe);
|
||||
var iframeWindow = frames[frames.length - 1];
|
||||
const iframeWindow = frames[frames.length - 1];
|
||||
|
||||
Object.keys(navigator.__proto__).sort().forEach(function(property){
|
||||
"use strict";
|
||||
|
||||
var value = iframeWindow.navigator[property];
|
||||
const value = iframeWindow.navigator[property];
|
||||
if ((typeof value) === "string"){
|
||||
log(property + "@iframe: " + value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue