User:DannyS712 test/isdead.js

// $(function { var IsD_config = {	name: 'Is Dead.js',	version: 1.0,	debug: true }; var IsD_summary = 'Set wikiproject parameters to reflect that the subject has died - with ' + IsD_config.name + ' (version ' + IsD_config.version + ')';

mw.loader.using( 'mediawiki.util', function {	importScript('User:DannyS712 test/page.js')    $(document).ready( function  { mw.util.addPortletLink ( 'p-cactions', 'javascript:void(0)', 'Is Dead', 'ca-make-dead', 'Edit to make dead'); $('#ca-make-dead').on('click', function {       	Make_dead;    	} ); } ); } ); function Make_dead{ var name = mw.config.get( 'wgPageName' ); var current = get_page( name ); var new_page = current.replace(/(living|blp)=(?:yes|y)/gi, '$1=no'); console.log( new_page ); set_page( name, new_page, IsD_summary, true); } }); //