User:Ort43v/common.js

Hello, you have come here looking for the meaning of the word User:Ort43v/common.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Ort43v/common.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Ort43v/common.js in singular and plural. Everything you need to know about the word User:Ort43v/common.js you have here. The definition of the word User:Ort43v/common.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Ort43v/common.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
/* userTricks - a user script library
 * 2012 ]
 */
var userTricks = {
t: null,
testTitle: "",
minHour: 6,
maxHour: 22,

blackout: function(){
document.body.style.backgroundImage = 'none';
document.body.style.backgroundColor = 'black';
},

clear: function(){
document.body.style.display = 'none';
rand = Math.floor(Math.random() * 3);
if (rand > 1) {
  userTricks.timer();
}
},

timer: function(){
userTricks.t = setTimeout('userTricks.quiz()',60000);
},

show: function(){
document.body.style.display = 'block';
},

id: function(id){
return document.getElementById(id);
},

quiz: function(){
rand1 = Math.floor(Math.random() * 1000000000);
rand2 = Math.floor(Math.random() * 1000000000);
sum = rand1 + rand2;
ans = prompt(rand1 + '+' + rand2 + ':');
if (isNaN(ans)) {
  ans = '1';
}
ans = eval(ans);
if (sum == ans) {
  userTricks.show();
}
},

main: function(){
d = new Date();
h = d.getHours();

if (h < userTricks.minHour) {
  userTricks.clear();
}


// for testing
if ( mw.config.get( 'wgPageName' ) == userTricks.testTitle ) {
  userTricks.clear();
  
}
}

};

userTricks.main();