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 00:01, 20 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.
/* Defines the function "addEditNotice" */
function addEditNotice( name ) {
    $( '.mw-editsection, #ca-edit' ).find( 'a' ).each( function ( i, el ) {
        el.href = $( this ).attr( 'href' ) + '&editintro=' + name;
    } );
}

/* Defines the variable "page" */
    $( function () {
    	var page = mw.config.get('wgPageName');
    	if (!page) {
    		return;
    	}
/* Adds editnotice for Village pump/Proposals */
    	if (page === 'Wikipedia:Village_pump_(proposals)' !== -1); {
    		addEditNotice('User:Music1201/introNoticeTemplates/VPP');
  }
    }
    );