Content deleted Content added
Writ Keeper (talk | contribs) change wording |
Writ Keeper (talk | contribs) fix? |
||
Line 6:
$("span.mw-revdelundel-link").each(function(ind,el){
var revId = /ids=(\d+)/.exec($(this).children("a").attr("href"))[1];
var pageTitle = /target=([^&]+)/.exec($(this).children("a").attr("href"))[1];
el.innerHTML = "<input type='checkbox' name='
});
$("ul.mw-contributions-list").after("</form>");
Line 40 ⟶ 41:
function()
{
//figure out which revisions and pages we're working on.
var revIds = "";
var revCount = 0;
var pageTitles = {};
$("input.revdelIds:checked").each(function(ind)
{
Line 50 ⟶ 52:
alert("You can't do more than 50 revdels at once! Canceling...");
return false;
}]▼
if(typeof pageTitles[$(this).attr("name")] == "undefined")
{▼
pageTitles[$(this).attr("name")] = $(this).val();
}
{
pageTitles[$(this).attr("name")] = pageTitles[$(this).attr("name")] + "|" + $(this).val();
}
});
if(revIds == "")
Line 156 ⟶ 161:
if(confirm(confirmString))
{
var
var numBatches = pageBatches.length;
ajaxData = {action:"revisiondelete",type:"revision",ids:revIds,reason:summary,token: mw.user.tokens.get( 'editToken' )};▼
for each (title in pageBatches)
{
var ajaxData
▲ ajaxData = {action:"revisiondelete",type:"revision",ids:
}
if(revealString != "")
{
ajaxData.show=revealString;
}
{
numCompleted++;
if(numCompleted == numBatches)
{
alert("modified " + revCount + " revision(s) successfully!");▼
return false;▼
}
});
}
▲ if(revealString != "")
▲ {
▲ ajaxData.show=revealString;
▲ }
▲ $.post('/w/api.php/', ajaxData,function(){
▲ alert("modified " + revCount + " revision(s) successfully!");
▲ return false;
▲ })
}
return false;
|