User:JibstaMan/wikia.js

/* PURGE BUTTON - */ importScriptPage('PurgeButton/code.js', 'dev');

/* --- ADMIN CONTROLS */

/* Enable Admin Controls */ function AdminControl { if(window.wgUserGroups && (wgUserGroups.indexOf("sysop")) != -1) { $('.admin').css({"display": 'inline'}); } } $(AdminControl);

/* Don't forget to sine */ addOnloadHook(function {   if(wgAction == 'edit' || wgAction == 'submit')    {        if(wgPageName.match(/^[^:]*talk:/i) || wgPageName.match(/^Forum:/))    	{    	    $('#wpSave').click(function(e) {   	    	if(typeof enforceSign === 'undefined') {   	    	    enforceSign = true; } 	 	var text = $('#cke_wpTextbox1 iframe').contents.find('#bodyContent').text || $('#wpTextbox1').val; if(enforceSign && !$('#wpMinoredit').is(':checked') && !text.replace(/( .*?<\/nowiki>)/g, ).match() && !window.location.search.match(/(?:\?|&)undo=/)) {   	            if(!confirm('It looks like you forgot to sign your comment.\nAre you sure you want to post it?')) {   	                e.preventDefault; }   	    	}    	    });    	}    } });