User:SoledadKabocha/markBlockedPlus-portable.js

function defaultPref( cfig, dflt ) { return ( typeof cfig == typeof dflt ? cfig : dflt ); } function markBlocked { mw.util.jsMessage(       'This version of markBlockedPlus-portable.js has been deprecated. ' +        'Please use ' +        'the original markBlockedPlus instead for now.'    ); }

//start on some pages var zzAction = mw.config.get( 'wgAction' ); switch( zzAction ){ case 'edit': case 'submit': if( !window.mbEnableWhenEditing ) break case 'purge': //shouldn't happen on recent MW; action=purge should redirect (or prompt for confirmation?) rather than showing page content //just give up  break; case 'view': if( mw.config.get( 'wgNamespaceNumber' ) === 0 && !( window.mbEnableOnMainspaceDiff === true && document.URL.indexOf( 'diff=' ) != -1 ) ) break //otherwise continue with default default: //'history', etc. $(function{     if( window.mbNoAutoStart === true )       mw.util.addPortletLink(defaultPref( window.mbOnDemandLinkLoc, 'p-cactions' ), 'javascript:markBlocked', defaultPref( window.mbOnDemandLinkText, 'XX' ), 'ca-showblocks')     else       markBlocked  }) }