Jump to content

User:Music1201/introNotice.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Music1201 (talk | contribs) at 22:57, 19 July 2016 (+). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* Adds BLP edit notice -- enabled automatically for all users in MediaWiki:Common.js */
function addEditIntro( name ) {
    $( '.mw-editsection, #ca-edit' ).find( 'a' ).each( function ( i, el ) {
        el.href = $( this ).attr( 'href' ) + '&editintro=' + name;
    } );
}

/*    $( function () {
        var cats = mw.config.get('wgCategories');
        if ( !cats ) {
            return;
        }
        if ( $.inArray( 'Wikipedia village pump', cats ) !== -1 || $.inArray( 'Wikipedia proposals', cats ) !== -1 ) {
            addEditIntro( 'User:Music1201/introNoticeTemplates/VPP' );
        }
    } );
} */

    $( function () {
    	var page = mw.config.get('wgPageName');
    	if (!page ) {
    		return;
    		
    	}
    	if ( $.inArray( 'Wikipedia:Village_pump_(proposals)', page))
    		addEditIntro('User:Music1201/introNoticeTemplates/VPP')
} );