Difference between revisions of "MediaWiki:Common.js"

From Johnisdead Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
 +
 +
 +
 +
 +
function checkCookie() {
 +
    let stare = getCookie("stares");
 +
    if (stare != "") {
 +
          console.log("Cookie does not exist!");
 +
    } else {
 +
          document.cookie = "stares=0; expires=Sat, 11 Nov 2423 12:00:00 UTC";
 +
          console.log("Cookie exists and it is " + stare);
 +
    }
 +
}
 +
 +
 +
 +
 
var i;  
 
var i;  
 
i = Math.floor(Math.random() * 11);
 
i = Math.floor(Math.random() * 11);

Revision as of 11:30, 24 September 2024






function checkCookie() {
     let stare = getCookie("stares");
     if (stare != "") {
          console.log("Cookie does not exist!");
     } else {
          document.cookie = "stares=0; expires=Sat, 11 Nov 2423 12:00:00 UTC";
          console.log("Cookie exists and it is " + stare);
     }
}




var i; 
i = Math.floor(Math.random() * 11);
console.log(i);
if (i == 5) {
document.getElementById('mw-navigation').innerHTML += '<img src="https://johnisdead.withinhubris.com/images/6/63/Stared2.gif" alt="" style="position: absolute;top: 10px;left: 30%;width: 70px;z-index: 10;">'
}