Jump to content

User:This, that and the other/vector.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
////// LIVE CLOCK ////////////////////////
function showTime()
{
	var dateNode = liveClock.node;
	if (!dateNode) return;
	var now = new Date();
	var hh = now.getUTCHours();
	var mm = now.getUTCMinutes();
	var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + "<span style=\"font-weight: normal;\"> UTC<\/span>";
	dateNode.firstChild.innerHTML = time;
	window.setTimeout(showTime, 10000);
}

function liveClock()
{
	liveClock.node = mw.util.addPortletLink( 'p-personal', mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=' + encodeURIComponent(mw.config.get('wgPageName')) + '&action=purge', '', 'utcdate' );
	liveClock.node.style.fontWeight = 'bold';
	showTime();
}
mw.loader.using(['mediawiki.util'], liveClock);

////// TWINKLE ////////////////////////

function twme() {
  mw.loader.using( ['mediawiki.util','jquery.ui','jquery.tipsy'], function(){
        mw.loader.load('//en.wikipedia.org/w/index.php?title=User:This,_that_and_the_other/morebits.js&action=raw&ctype=text/javascript');
        mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-morebits.css&action=raw&ctype=text/css', 'text/css');
        mw.loader.load('//en.wikipedia.org/w/index.php?title=User:This,_that_and_the_other/twinkle-alpha.js&action=raw&ctype=text/javascript');
  });
}
twinkleUserAuthorized = true;  // for debugging purposes only

////// FLEXITAGS ////////////////////////
// removed due to dodgy "curvy tabs" (doesn't work in IE7)

//importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
//importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
//importScript('User:LilDice/flexitags.js');

////// BLOCKED USER STRIKEOUT ////////////////////////

//importScript('User:NuclearWarfare/Mark-blocked script.js');

////// SIMPLEVOTE (for testing of the new morebits - I don't actually use this) ////////////////////////
//importScript('User:Paranomia/simplevotefluff.js'); importScript('User:btilm/simplevote2.js');

////// FURME (for testing) ////////////////////////
//importScript('User:AzaToth/morebits.js');
//importScript("MediaWiki:Gadget-morebits.js");
//importScript('User:AWeenieMan/furme.js');

//importStylesheet("User:This,_that_and_the_other/ftcg.css");