User:JosephHawk/common.js

//Add link to Special:Nuke //By Lil' Miss Rarity //Add link to chatconnect log by Ozuzanna if (mw.config.get("wgCanonicalSpecialPageName") === "Contributions") { $(".chat-change-ban").after(" | Nuke"); $(".chat-change-ban").after(" | Nuke + Block (A)"); $("#contribs-nuke-block").click(function {        $.ajax({ url: "/api.php", type: "POST", dataType: "JSON", data: { action: "block", user: (mw.config.get("wgPageName").split("/")[1]), expiry: "indefinite", reason: "Advertisement", nocreate: 0, autoblock: 0, format: "json", token: mw.user.tokens.values.editToken },           success: function (d) { if (!d.error) { window.location.replace("/wiki/Special:Nuke/" + (mw.config.get("wgPageName").split("/")[1])); } else { alert("Request failed: " + d.error.code); }           },            error: function  { alert("Request failed!"); }       });    });  $("#contribs-nuke-block").after(" | Chatconnect log"); }