User:ExtorcDev/rmMaster.js: Difference between revisions

Content deleted Content added
ExtorcDev (talk | contribs)
No edit summary
ExtorcDev (talk | contribs)
No edit summary
Tag: Reverted
Line 1:
<nowiki>
$('.mw-heading').each(function(index){
var $heading = $(this).find('span.mw-headline');
Line 23 ⟶ 24:
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 48 ⟶ 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 55 ⟶ 56:
}
else{
var updatedSection = section.replace(section.match(/.UTC./m),'(UTC){{subst' + ':relisting}}');
result = result.replace(section, updatedSection);
console.log(result);
Line 76 ⟶ 77:
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>