MediaWiki:Gadget-common-action-delete.js

Allikas: Vikipeedia

Märkus: Võimalik, et pärast avaldamist tuleb muudatuste nägemiseks brauseri puhver tühjendada.

  • Firefox / Safari: Hoia all Shift-klahvi ja klõpsa Laadi uuesti või vajuta kas Ctrl-F5 või Ctrl-R (Macis ⌘-R).
  • Google Chrome: Vajuta Ctrl-Shift-R (Macis ⌘-Shift-R).
  • Internet Explorer / Edge: Hoia all Ctrl-klahvi ja klõpsa Värskenda või vajuta Ctrl-F5.
  • Opera: Vajuta Ctrl-F5.
$( "#deleteconfirm" ).submit( function () {
	var other = document.getElementsByName( 'wpDeleteReasonList' )[0].options[0].selected,
		reason = document.getElementsByName( 'wpReason' )[0].value,
		rootpage = mw.config.get ( 'wgTitle' ).split( '/' )[0],
		username = mw.config.get ( 'wgUserName' );
	if ( other === true && reason === "" && rootpage !== username ) {
		mw.notify( 'Kustutamise põhjust pole valitud ega sisestatud.', { 
			title: 'Põhjus puudub!',
			type: 'error',
			autoHide: false,
			tag: 'delreason',
		} );
		return false;
	}
} );