User:ExtorcDev/rmMaster.js: Difference between revisions

Content deleted Content added
ExtorcDev (talk | contribs)
No edit summary
ExtorcDev (talk | contribs)
No edit summary
Line 22:
if(sectionLog[i].match(/Requested move \d/gm) && sectionLog[i+1].match(/{{requested move.*/g)){
var section = sectionLog[i+1];
section = section + '\n{{subst:' + 'RM bottom}}\n';
var closeMSG = window.prompt("Close Message : ");
var updatedSection = section.replace(/{{requested move.*/g,'{{subst:' + 'RM top|' + closeMSG + '|nac=yes}}');
result = result.replace(sectionLog[i+1], updatedSection);
console.log(result);
Line 49:
console.log('Already relisted atleast once');
var prevRelists = section.match(/'''''Relisting.*>/);
var newRelists = prevRelists + '{{subst' + ':relisting}}';
var updatedSection = section.replace(prevRelists, newRelists);
result = result.replace(section, updatedSection);
Line 56:
}
else{
var updatedSection = section.replace(section.match(/.UTC./m),'(UTC){{subst' + ':relisting}}');
result = result.replace(section, updatedSection);
console.log(result);
Line 92:
var reason = window.prompt("Request reason : ");
var techReq = '{{subst:' + 'RMassist|'+ moveFrom +'|' + moveTo + '|reason=' + reason + '}}';
var api2 = new mw.Api();