Content deleted Content added
Writ Keeper (talk | contribs) convert alert() to mw.notify() |
Writ Keeper (talk | contribs) collapse by default |
||
Line 1:
var lastSelectedRevdel = -1;
var revdelToolbarShowing = false;
mw.hook("wikipage.content").add( function()
Line 9 ⟶ 10:
if(mw.config.get("wgCanonicalSpecialPageName") == "Contributions")
{
$("ul.mw-contributions-list").before("<div style='display:inline-block;' id='revdelCP'>
<img id='revdelLabelImg' src='/w/load.php?modules=oojs-ui.styles.icons-movement&image=expand&format=rasterized&lang=en' style='width:12px; transform:rotate(270deg);'/></span>\
<span id='revdelCPBody' style='display:none;'><input type='button' id='revdelSelectAll' value='Select all'><input type='button' id='revdelSelectNone' value='Select none'>\
<span style='white-space:nowrap;'><input type='checkbox' id='revdelContent' name='revdelOptions' value='content'> delete content</span> \
<span style='white-space:nowrap;'><input type='checkbox' id='revdelName' name='revdelOptions' value='userName'> delete user name</span> \
Line 17 ⟶ 20:
<span style='white-space:nowrap;'><input type='checkbox' id='undelComment' name='revdelOptions' value='editSummary'> undelete edit summary</span> \
<br/><select id='wpRevDeleteReasonList'><option value='other'>Other reason</option></select><input name='wpReason' size='60' id='wpReason' maxlength='100'>\
<input type='button' class='revdelSubmit' id='revdelSubmit' value='Revdel selected entries'> \
<input type='button' class='revdelSubmit' id='oversightSubmit' value='Oversight selected entries'></span></div>"); $("ul.mw-contributions-list .mw-revdelundel-link").each(function(ind,el){
var revId = /ids=(\d+)/.exec($(this).children("a").attr("href"))[1];
Line 35 ⟶ 39:
//attach handlers
$("#revdelLabel").click(
function()
{
if(revdelToolbarShowing)
{
revdelToolbarShowing = false;
$("#revdelLabelImg").css("transform","rotate(270deg)");
$("#revdelCPBody").fadeOut();
}
else
{
revDelToolbarShowing = true;
$("#revdelLabelImg").css("transform","none");
$("#revdelCPBody").fadeIn();
}
});
);
$("#revdelSelectAll").click(
function()
Line 41 ⟶ 62:
{
$(this).prop("checked", true);
});
}
);
Line 50 ⟶ 71:
{
$(this).prop("checked", false);
});
}
);
|