User:Tvaughn05/monobook.js

From Wikipedia, the free encyclopedia

If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
//<nowiki>
// Filter changes live
// [[User:Lupin/recent2.js]] - please include this line
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
// [[User:Lupin/popups.js]]
 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//hideOwn
 
addOnloadHook(function () {
  for (var i=0; i<document.links.length; ++i) {
    if (document.links[i].href.indexOf('Special:Watchlist')>0) {
      document.links[i].href+='?hideOwn=1';
      break;
    }
  }
});
 
// 
 
  //  Add time to your monobook "personal menu" list at the very top of the page.
  //  Created by [[User:Mathwiz2020]]
  //
  //  Indicate where you would like the time to appear:
  //    pt-userpage, pt-mytalk, pt-preferences,
  //    pt-watchlist, pt-mycontris, pt-logout
  //
gsTimeInsertBefore = ''; // leave blank to append after "logout"
  //
function makeTime()
{
  var li = document.createElement( 'li' );
    li.id = 'pt-time';
 
    var mySpan = document.createElement( 'span' );
      mySpan.appendChild( document.createTextNode( '00:00:00' ) );
 
    li.appendChild( mySpan );
 
  if ( ! gsTimeInsertBefore ) // append to end (right) of list
  {  document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
  }
  else
  {  var before = document.getElementById( gsTimeInsertBefore );
      before.appendChild( li, before );
  }
doTime = window.setTimeout("getTime()", 1000);
}
   if ( window.addEventListener ) window.addEventListener( 'load', makeTime, false );
else if ( window.attachEvent      ) window.attachEvent   ( 'onload', makeTime );
 
function getTime()
{
    var time = new Date();
    var hours = time.getUTCHours();
    if (hours < 10) { hours = "0" + hours; }
    var minutes = time.getUTCMinutes();
    if (minutes < 10) { minutes = "0" + minutes; }
    var seconds = time.getUTCSeconds();
    if (seconds < 10) { seconds = "0" + seconds; }
    var currentTime = hours + ":" + minutes + ":" + seconds;
    document.getElementById('pt-time').childNodes[0].childNodes[0].replaceData(0, 8, currentTime);
doTime = window.setTimeout("getTime()", 1000);
}
 
// Live Preview customization,
// edit this to your own liking.
 
wpUserName   = 'Tvaughn05';   // User name to display in signatures
wpShowImages = true;      // Enable downloading and displaying of images
 
// Include Live Preview...
document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
// Now set everything up
window.onload = Main;
 
function Main()
{
 LivePreviewInstall();
 // You may include here other "extensions"
}
 
/* This is to keep track of who is using the Live Preview: [[User:Pilaf/livepreview.js]] */
 
 //
 // Edit tools for the vandal whack-a-mole game
 // [[User:Kbh3rd/whackamole.js]] - please include this line
 //
 document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Kbh3rd/whackamole.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</nowiki>