User:DannyS712 test/GTK.js

// $(function { var CFDS_config = {	version: 2.0,	debug: false }; var CFDS_this_link = 'WP:CFDS'; var CFDS_summary = 'Prepend speedy renaming template per ' + CFDS_this_link;

mw.loader.using( 'mediawiki.util', function {	importScript('User:DannyS712 test/prepend.js');    $(document).ready( function  { mw.util.addPortletLink ( 'p-cactions', 'javascript:void(0)', 'CFDS', 'ca-CFDS', 'Prepend speedy renaming template'); $('#ca-CFDS').on('click', function {       	CFDS;    	} ); } ); } ); function CFDS{ var name = mw.config.get( 'wgPageName' ); name = name.replace(/_/g, " "); console.log( name ); //Change this line to determine what the template says var new_name = 	name.replace(/vice-presidential/gi, "vice presidential"); console.log ( new_name ); var template =  + new_name + ; console.log ( template ); prepend( CFDS_summary, template ); } }); //