Monchoman45

It's a conspiracy

Oct 27th, 2011
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* SingTitle + Date */
  2. function random(min, max) {
  3.     return Math.floor(Math.random() * max + min);
  4. }
  5.  
  6. function TitleChanger() {
  7.     if(wgIsMainpage) {return;}
  8.     var date = '';
  9.     var oldtitle = document.getElementsByTagName('title')[0].innerHTML;
  10.     var newtitle = '';
  11.     if(random(0, 10000) == 9001) {
  12.         date = '9001';
  13.     }
  14.     else {
  15.         date = random(0, 4).toString() + random(0, 9).toString() + random(0, 9).toString() + random(0, 9).toString();
  16.     }
  17.     date++;
  18.     date = date.toString().replace(/^[0]/g, '');
  19.     newtitle = oldtitle.substring(0, oldtitle.indexOf("1775"));
  20.     if(document.getElementById('singulartitle') || wgCanonicalNamespace != '') {
  21.         document.getElementsByTagName('title')[0].innerHTML = newtitle.replace(' are ', ' is ') + ' ' + date + '!';
  22.     }
  23.     else {
  24.         document.getElementsByTagName('title')[0].innerHTML = newtitle + date + '!';
  25.     }
  26. }
  27. addOnloadHook(TitleChanger);
  28.  
  29. /* AjaxRC */
  30. AjaxRCRefreshText = 'Auto-refresh';
  31. AjaxRCRefreshHoverText = 'Automatically refresh the page';
  32. importScriptPage('AjaxRC/code.js', 'dev');
  33.  
Advertisement
Add Comment
Please, Sign In to add comment