User:KurwaAntics/common.js

importArticles({	type: 'style',	articles: [		'u:dev:MediaWiki:TZclock.css'	] }, {	type: 'script',	articles: [		'u:dev:TZclock.js',		'w:c:Snow.js'	] });

/* ********** Edit summary warning ********** */ $('#wpSave').click(function {   if (wgNamespaceNumber === 0 && !$('#wpSummary').val) {        $.showCustomModal('Edit summary', 'You left the edit summary blank. Please help other contributors pick up where you left off by writing edit summaries. Thank you.', { id: 'edit-summary-error', width: 400, buttons: [{ message: 'OK', defaultButton: true, handler: function { $('#edit-summary-error').closeModal; }           }]        });        return false;    } });

/* ********** Notimodule ********** *//* var notimoduleTitle = window.notimoduleTitle || 'Notifications'; var notimodulePagename = window.notimodulePagename || 'Template:Notimodule';

$('#WikiaRail').prepend(' '+ notimoduleTitle +' ');

if ( wgUserGroups.indexOf("sysop") >= 0 ) { $('#notimodule h2').append(''); }

$('#notimodule > div').load('/wiki/'+ notimodulePagename +'?action=render');

/* ********** Live subscriber count ********** *//* $('.LiveSubsCount').each(function {   var lsc = $(this).data('name');    $('#WikiaRail').prepend(' ').show;    $(this).remove; });

/* ********** Second rail ********** *//* var hpwrail = window.hpwrail || 'Template:Hpwrail';

$('#WikiaRailWrapper').append(' ') .prepend('Main rail | Custom rail ');

$('#HPWrail').load('/wiki/'+ hpwrail +'?action=render');

if ( wgUserGroups.indexOf("sysop") >= 0 ) { $('#WikiaRailWrapper aside').append(''); }

$('.toggle-hpw').click(function{   if (!$(this).hasClass('active')) {        $('#WikiaRail').toggle;        $('#HPWrail').toggle;        $('#edit-rail').toggle;        $('.toggle-hpw.active').removeClass('active');        $(this).addClass('active');    } });

/* ********** Live subscriber count ********** *//* $('.LiveSubsCount').each(function {   var lsc = $(this).data('name');    $('#WikiaRail').prepend(' ').show;    $(this).remove; });

$("#HPWrail").ready(function {   // call the function after the element has been loaded here    console.log("HPWrail loaded!"); });

/* ********** Average rating score ********** *//* $(document).ready(function { $('.rate-poll').each(function{ var weight = 5 * parseInt( $('.pollAnswer:nth-child(1) span').text ) + 4 * parseInt( $('.pollAnswer:nth-child(2) span').text ) + 3 * parseInt( $('.pollAnswer:nth-child(3) span').text ) + 2 * parseInt( $('.pollAnswer:nth-child(4) span').text ) + parseInt( $('.pollAnswer:nth-child(5) span').text ); var total = parseInt( $('.pollAnswer:nth-child(1) span').text ) + parseInt( $('.pollAnswer:nth-child(2) span').text ) + parseInt( $('.pollAnswer:nth-child(3) span').text ) + parseInt( $('.pollAnswer:nth-child(4) span').text ) + parseInt( $('.pollAnswer:nth-child(5) span').text ); if (total !== 0) { var average = ( weight / total ).toFixed(2); $('Average: ' + average + ' ').insertAfter('#ajax-poll-area'); } }); });



$('.toolbar .tools').append(' \	  \	Special</a>\	<ul class="tools-menu">\		<li><label style="width:100%"><input type="checkbox" id="snowing-checkbox"> Snowing </a></li>\	</ul>\ </li>');