Content deleted Content added
Writ Keeper (talk | contribs) oops |
Writ Keeper (talk | contribs) switch from global variables to jquery data |
||
Line 1:
var revdelToolbarShowing = false;▼
mw.hook("wikipage.content").add( function()
{
Line 10 ⟶ 7:
if(mw.config.get("wgCanonicalSpecialPageName") == "Contributions")
{
$("ul.mw-contributions-list").before("<div style='display:inline-block;' id='revdelCP'><span id='revdelLabel' style='cursor:pointer;'>Revision deletion\
<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'>\
Line 30 ⟶ 27:
$("ul.mw-contributions-list").after("</form>");
$("#revdelCP").data("lastSelectedIndex", -1);
//load canned summaries
$.get("/w/index.php?title=MediaWiki:Revdelete-reason-dropdown&action=raw",function(data)
Line 42:
function()
{
if($("#revdelCP").data("revdelToolbarShowing"))
{
$("#revdelCP").data("revdelToolbarShowing
$("#revdelLabelImg").css("transform","rotate(270deg)");
$("#revdelCPBody").fadeOut();
Line 50:
else
{
$("#revdelLabelImg").css("transform","none");
$("#revdelCPBody").fadeIn();
Line 77:
function(ev)
{
var lastSelectedRevdel = $("#revdelCP").data("lastSelectedIndex");
var newIndex = $(this).data("index")
if(ev.shiftKey && lastSelectedRevdel >= 0)
Line 98 ⟶ 99:
}
}
}
);
|