User:ExtorcDev/rmMaster.js: Difference between revisions

Content deleted Content added
ExtorcDev (talk | contribs)
No edit summary
ExtorcDev (talk | contribs)
use prompts instead of parsed names to reconcile RMs with multiple moves
Line 77:
if(sectionLog[i].match(/Requested move \d/gm)){
var section = sectionLog[i+1];
var moveFrom = sectionwindow.match(/.*→/m).toStringprompt("Enter Move Source : ");
var moveTo = window.prompt("Enter Move Destination : ");
moveFrom = moveFrom.replace('→', '');
moveFrom = moveFrom.replace(':', '');
var mt = section.match(/→.*(?=)–/gm).toString();
var moveTo = mt.replace('–', '');
moveTo = moveTo.replace('→', '');
if(moveTo.match(/{{.*}}/gm)){
moveTo = moveTo.match(/(?<=[|]).*(?=}})/gm).toString();
moveTo.replace('|', '');
}
console.log(moveFrom, moveTo);
var reason = window.prompt("Request reason : ");
var techReq = '{{subst:RMassist|'+ moveFrom +'|' + moveTo + '|reason=' + reason + '}}';