User:ExtorcDev/rmMaster.js: Difference between revisions

Content deleted Content added
ExtorcDev (talk | contribs)
No edit summary
ExtorcDev (talk | contribs)
No edit summary
Line 90:
var reason = window.prompt("Request reason : ");
var techReq = '{{subst:' + 'RMassist|'+ moveFrom +'|' + moveTo + '|reason=' + reason + '}}';
console.log(techReq);
var api2 = new mw.Api();
api2.get( queryParams('Wikipedia:Requested moves/Technical requests') ).done( function ( data ) {
var page2;
for (page2 in data.query.pages){
result2 = data.query.pages[page2].revisions[0]['*'];
var match = result2.match(/<!--.*/gm).toString();
var newMatch = match.append('\n' + techReq);
result2 = result2.replace(match, newMatch);
console.log(techReqresult2);
}
});
// editPage(url, result, 'Closed');
}