User:Chairboy/blockhelper.greasemonkey.js

This article delves into the importance of User:Chairboy/blockhelper.greasemonkey.js in various aspects of daily life, whether in the work, personal or social sphere. User:Chairboy/blockhelper.greasemonkey.js plays a fundamental role in our decisions, attitudes and behaviors, directly or indirectly influencing our perception of the world around us. Throughout history, User:Chairboy/blockhelper.greasemonkey.js has been the object of study, debate and reflection, awakening the interest of philosophers, scientists, sociologists and academics from various disciplines. In this sense, it is relevant to explore the multiple facets of User:Chairboy/blockhelper.greasemonkey.js and its impact on contemporary society, as well as the possible future implications that could arise from its continued evolution.
'''Blockhelper''' is a ] script for administrators to make it easy to specify a block reason that is comprehensive and explanatory.  It adds a menu to the left of the block UI with some common (and easily modified) block reasons.  When you select them, it populates the block reason field with an indepth explanation behind the specific blocking policy that was executed.  User blocks already suck, no sense adding insult to injury by leaving no explanation in the logs other than "user...."
]
To use, you must have Greasemonkey installed (or perhaps you can modify your monobook.js, let me know how that works out).  Just copy and past the code below into a file named 'blockhelper.user.js' and drag it into your browser.  Greasemonkey will install it, and each subsequent visit to the block page will have the new menu in place.
<pre><nowiki>
// Block helper script
// Make block reasons a teensy bit easier to specify and a lotta bit easier to understand
// 2006-12-20
// Licensed GFDL, see gpl.org
// Ben Hallert
// 
// ==UserScript==
// @name        WikiBlock helper
// @namespace   http://hallert.net/
// @description Provide a dropdown menu of block criteria in userblock pages on Wikipedia.  Admins only.
// @include     http://en.wikipedia.org/*
// ==/UserScript==

if (document.getElementById('blockip'))
{
        var parent_form = document.getElementById('blockip');
        var par         = document.getElementsByName('wpBlockReason');
        var newhelper   = document.createElement('select');
	par.setAttribute('size','100');
        newhelper.setAttribute('id','blockhelper');
        newhelper.setAttribute('onChange','document.getElementsByName(\'wpBlockReason\').value = document.getElementById(\'blockhelper\').value;');
        newhelper.innerHTML = "<option value=\'\'>Block Reasons</option>"
+ "<option value=\'] Protection - The user has been blocked because of persistent personal attacks against others.\'>Personal attacks</option>"
+ "<option value=\'] Protection - The user has been blocked because he or she has made physical threats of harm.\'>Physical threats</option>"
+ "<option value=\'] Protection - The user has been blocked for posting inappropriate personal details.\'>Personal info</option>"
+ "<option value=\'] Protection - The user has been blocked for persistent copyright infringement.\'>Persistent copyvio</option>"
+ "<option value=\'\'>---------------</option>"
+ "<option value=\'] Disruption - This user has been blocked for disrupting the project.\'>General disruption</option>"
+ "<option value=\'] Disruption - This user has been blocked for acting as a disruptive ].\'>Disruptive sock</option>"
+ "<option value=\'] Disruption - This user has been blocked for violating the Wikipedia ].\'>Bad username</option>"
+ "<option value=\'\'>---------------</option>"
+ "<option value=\'] Banned - This user has been blocked in accordance with Wikipedia's ] under the direction of the ], ], or the ].\'>Bannination</option>"
+ "<option value=\'] Evasion of block - This block has been extended or expanded appropriately to deal with a user who has attempted to evade a legitimate block.\'>Block evasion</option>"
+ "<option value=\'] Range block - This range has been temporarily blocked to deal with a user who is changing IPs in an attempt to evade a block.\'>Range block</option>";
;

	if(parent_form)
	{
		//If it finds the 'blockip' form
		var firsttable	= parent_form.getElementsByTagName('table');
		if(firsttable)
		{
			var firsttbody	= firsttable.getElementsByTagName('tbody');
			if(firsttbody)
			{
				var firstrow	= firsttbody.getElementsByTagName('tr');
				if(firstrow)
				{
					var newcell	= firstrow.insertCell(0);
					newcell.setAttribute('rowspan','8');
				        newcell.appendChild(newhelper);
				        newhelper.setAttribute('size','13')
				}
			}
		}
	}



}
void 0
</nowiki></pre>