User:Kuru/common.js

//

// Blocked user script mw.loader.load('//ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');

// Sidebar populate $( document ).ready(	function {		if (mw.config.get( "wgAction" ) == 'edit' ) {			mw.util.addPortletLink('p-tb', 'javascript:kDateHeader;', 'Current Month');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-vandalism1","Reminder: Constructive editing");', 'Warn: VAND1');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-vandalism2","Warning: Constructive editing");', 'Warn: VAND2');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-vandalism3","Warning: Vandalism");', 'Warn: VAND3');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-vandalism4","Warning: Last chance");', 'Warn: VAND4');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-vandalism4im","Warning: Blatant Vandalism");', 'Warn: VANDX');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-spam1","Reminder: External links");', 'Warn: SPAM1');			mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-spam2","Warning: External links");', 'Warn: SPAM2'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-spam3","Warning: External links");', 'Warn: SPAM3'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-spam4","Warning: Last chance");', 'Warn: SPAM4'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-spam4im","Warning: Blatant Spam");', 'Warn: SPAMX'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("user:Kuru/templates/mirror1","Reminder: Circular references");', 'Warn: MIR1'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("uw-unreliable","Reminder: Unreliable references");', 'Warn: UNREL'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("user:Kuru/templates/blackhat","Warning: Promotional sources");', 'Warn: BLACK'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("user:Kuru/templates/blockshort","Temporary block");', 'Block: TEMP'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("user:Kuru/templates/blockindef","Indefinite block");', 'Block: IND'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("Spamusernameblock","Username problem + promotional edits");', 'Block: USR'); mw.util.addPortletLink('p-tb', 'javascript:kWarn("Spamblacklistblock","Spam blacklist block");', 'Block: SPAMBL'); }	} );

// Warning subroutine function kDateHeader {

var f = document.editform ; const today = new Date;

f.wpTextbox1.value += "\n== " + today.toLocaleString('default', { month: 'long' }) + " " + today.getFullYear + " ==\n" ; f.wpTextbox1.focus; if (f.wpTextbox1.scrollTop || true) f.wpTextbox1.scrollTop = f.wpTextbox1.scrollHeight ; }

// Warning subroutine function kWarn(message, summary) {

var f = document.editform ;

f.wpTextbox1.value += ""+ prompt ("Article name?")+ " ~ \n" ; f.wpSummary.value = summary ; f.wpMinoredit.checked=false; f.wpWatchthis.checked=false; f.wpTextbox1.focus; if (f.wpTextbox1.scrollTop || true) f.wpTextbox1.scrollTop = f.wpTextbox1.scrollHeight ; }

// importScript('User:Headbomb/unreliable.js'); // Backlink: User:Headbomb/unreliable.js