User:WikiMacaroons/cemessage.js

var cemes = $(mw.util.addPortletLink('p-personal','#','CE Message','Copyedit Message','Copyedit Message','','#pt-mytalk')); $( cemes ).click( function { var shortd = prompt("Page name?", "");  if (shortd === null || shortd === "") {  } else {  		var halfsig = "";  		var sign = prompt("Sign?", halfsig+halfsig);   		const cemes = `

`+shortd+` Copyedit
`;	  var params2 = { action: 'edit', title: document.getElementById("firstHeading").textContent, appendtext: cemes, summary: 'Added Copyedit message automatically using My Copyedit Script', format: 'json' },		api2 = new mw.Api; api2.postWithToken( 'csrf', params2 ).done( function ( data ) {	} ); location.reload; } });