User:Yamamoto Ichiro/quickblock.js

// // User:Yamamoto Ichiro/quickblock.js // This script is dervived from user:Where/usertabs addOnloadHook(function { if (wgTitle.indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //no subpages or history     return;  if (wgCanonicalNamespace == "User" || wgCanonicalNamespace == "User_talk") {     var username = encodeURIComponent( wgTitle );     mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Special:Blockip&wpBlockAddress=" + username + "&wpBlockExpiry=other&wpBlockOther=31%20hours&wpBlockReason=vandalism&wpAnonOnly=0", "31h", "", "block user 31 hours for vandalism");     mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Special:Blockip&wpBlockAddress=" + username + "&wpBlockExpiry=other&wpBlockOther=31%20hours&wpBlockReason=vandalism&wpAnonOnly=1", "31ha", "", "block user 31 hours for vandalism (anon only)");     mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Special:Blockip&wpBlockAddress=" + username + "&wpBlockExpiry=other&wpBlockOther=1%20week&wpBlockReason=vandalism&wpAnonOnly=0", "1w", "", "block user 1 week for vandalism"); mw.util.addPortletLink("p-cactions", wgServer + "/w/index.php?title=Special:Blockip&wpBlockAddress=" + username + "&wpBlockExpiry=other&wpBlockOther=indefinite&wpBlockReason=vandalism&wpAnonOnly=0", "inf", "", "block user indefinitely"); } });

//