User:Writ Keeper/Scripts/massRevdel.js: Difference between revisions

Content deleted Content added
Undid revision 683502459 by Writ Keeper (talk) didn't work, i'll try spans or something
don't need that any more
Line 3:
if(mw.config.get("wgCanonicalSpecialPageName") == "Contributions")
{
$("ul.mw-contributions-list").before("Revision deletion: <formdiv style='display:inline-block;' id='revdelCP'>Revision deletion: <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> \
<span style='white-space:nowrap;'><input type='checkbox' id='revdelComment' name='revdelOptions' value='editSummary'> delete edit summary</span> \
<span style='white-space:nowrap;'><input type='checkbox' id='undelContent' name='revdelOptions' value='content'> undelete content</span> \
<span style='white-space:nowrap;'><input type='checkbox' id='undelName' name='revdelOptions' value='userName'> undelete user name</span> \
<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' id='revdelSubmit' value='Revdel selected entries'>");\
<input type='button' class='revdelSubmit' id='revdelSubmit' value='Revdel selected entries'><!--<input type='button' class='revdelSubmit' id='oversightSubmit' value='Oversight selected entries'>--></div>");
$("ul.mw-contributions-list span.mw-revdelundel-link").each(function(ind,el){
var revId = /ids=(\d+)/.exec($(this).children("a").attr("href"))[1];
Line 9 ⟶ 17:
el.innerHTML = "<input type='checkbox' name='"+decodeURIComponent(pageTitle)+"' class='revdelIds' value='"+revId+"'>";
});
$("ul.mw-contributions-list").after("</form>");
//load canned summaries
Line 38 ⟶ 45:
}
);
$("#.revdelSubmit").click(
function()
{
Line 73 ⟶ 80:
var deleteString = "";
var revealString = "";
var typeString = "revdel";
if($("#revdelContent").prop("checked") == $("#undelContent").prop("checked"))