User:ExtorcDev/rmMaster.js: Difference between revisions

Content deleted Content added
ExtorcDev (talk | contribs)
No edit summary
Tag: Reverted
ExtorcDev (talk | contribs)
Undid revision 1156993089 by ExtorcDev (talk)
Line 1:
<nowiki>
$('.mw-heading').each(function(index){
var $heading = $(this).find('span.mw-headline');
Line 24 ⟶ 23:
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 ⟶ 48:
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 ⟶ 55:
}
else{
var updatedSection = section.replace(section.match(/.UTC./m),'(UTC){{subst' + ':relisting}}');
result = result.replace(section, updatedSection);
console.log(result);
Line 77 ⟶ 76:
function queryParams(url){ return { action: 'query', prop: 'revisions', rvprop: 'content', rvlimit: 1, titles: url }; }
function editParams(url, action){ return { action: 'edit', title: url, text: result, summary: action + ' Request using [[User:ExtorcDev/rmMaster.js|rmMaster]]' }; }
</nowiki>