User:Animum/rfavote.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Animum/rfavote. |
/* This is a complete joke. Do not take its advice seriously. */
function rfavote() {
var benchmark = Math.random() * 100;
var decider = Math.round(Math.random() * 100);
var supportrationales = [
"Per above.",
"Seen him around. Nice guy.",
"Excellent candidate.",
"Overall impression is good.",
"Why the hell not?",
"Has a cool userpage.",
"Need I say more?"
];
var opposerationales = [
"I vaguely remember a time when he did something wrong.",
"Not enough featured content.",
"We don't need any more admins.",
"Not comfortable supporting.",
"Almost no contributions to the MediaWiki namespace",
"Why the hell not?",
"Not in the BRC."
];
var neutralrationales = [
"It would be rude not to show.",
"Good vandal fighter, but not enough featured content.",
"Their english ain't good.",
"Both the affirmative and the opposition make good arguments.",
"Per below.",
"I know this user has done something wrong, but I can't find proof of it.",
"Why the hell not?"
];
if(decider >= 0 && decider <= 33) alert("You are advised to:\n\nSupport – " + supportrationales[Math.round(benchmark / 17)] + " \~\~\~\~");
if(decider > 33 && decider <= 66) alert("You are advised to:\n\nOppose – " + opposerationales[Math.round(benchmark / 17)] + " \~\~\~\~");
if(decider > 66 && decider <= 100) alert("You are advised to:\n\nNeutral – " + neutralrationales[Math.round(benchmark / 17)] + " \~\~\~\~");
}
$(function() {
if((wgTitle.indexOf("Requests for adminship/") != -1 || wgTitle.indexOf("Requests for bureaucratship/") != -1) && wgNamespaceNumber == 4) {
mw.util.addPortletLink('p-cactions', "javascript:rfavote()", "rfavote", "ca-rfavote");
}
});