cornify
JavaScript
var cornify_count = 0;
var idol_time = 1000;
cornify_add = function() {
cornify_count += 1;
var cornify_url = 'https://www.dromenmakertjes.nl/';
var div = document.createElement('div');
div.style.position = 'fixed';
var numType = 'px';
var heightRandom = Math.random()*.75;
var windowHeight = 768;
var windowWidth = 1024;
var height = 0;
var width = 0;
var de = document.documentElement;
if (typeof(window.innerHeight) == 'number') {
windowHeight = window.innerHeight;
windowWidth = window.innerWidth;
} else if(de && de.clientHeight) {
windowHeight = de.clientHeight;
windowWidth = de.clientWidth;
} else {
numType = '%';
height = Math.round( height*100 )+'%';
}
div.onclick = cornify_add;
div.style.zIndex = 10;
div.style.outline = 0;
div.className = "cornify";
if( cornify_count==15 ) {
div.style.top = Math.max( 0, Math.round( (windowHeight-530)/2 ) ) + 'px';
div.style.left = Math.round( (windowWidth-530)/2 ) + 'px';
div.style.zIndex = 1000;
} else {
if( numType=='px' ) div.style.top = Math.round( windowHeight*heightRandom ) + numType;
else div.style.top = height;
div.style.left = Math.round( Math.random()*90 ) + '%';
}
var img = document.createElement('img');
var currentTime = new Date();
var submitTime = currentTime.getTime();
if( cornify_count==15 ) submitTime = 0;
//img.setAttribute('src',cornify_url+'getacorn.php?r=' + submitTime + '&url='+document.location.href);
var imageArray = ["https://www.dromenmakertjes.nl/wp-content/uploads/2017/09/021-1.png","https://www.dromenmakertjes.nl/wp-content/uploads/2017/09/dream1a.png","https://www.dromenmakertjes.nl/wp-content/uploads/2017/09/dream2a.png",
"https://www.dromenmakertjes.nl/wp-content/uploads/2017/09/dream3a.png","https://www.dromenmakertjes.nl/wp-content/uploads/2017/09/dream4a.png","https://www.dromenmakertjes.nl/wp-content/uploads/2017/09/dream1.png"];
function imgRandom(imgArr) {
return imgArr[Math.floor(Math.random() *...