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.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
Simplehelperscripttoeasilypopulatetheprotectrationalewhenprotectingpages.Listsafewcommonreasons,ifyoucanthinkofmore,letmeknow.[[Image:Protecthelper.png|center]]Itdoesn't do anything cool like pre-check boxes yet, but I'llseeifIcanfigureoutanefficientwaytodothatsoon.<pre>// Protect helper script // Help with wikipedia article protection// 2007-03-15// GFDL// Ben Hallert// // ==UserScript==// @name ProtectHelper// @namespace http://hallert.net/// @description Provide a dropdown menu of common page protection rationale on Wikipedia. Admins only.// @include http://en.wikipedia.org/*// ==/UserScript==if(document.getElementById('mwProtect-reason')){varprotect_table=document.getElementById('mwProtectSet');varpar=document.getElementById('mwProtect-reason');varnewhelper=document.createElement('select');newhelper.setAttribute('id','protecthelper');newhelper.setAttribute('onChange','document.getElementById(\'mwProtect-reason\').value = document.getElementById(\'protecthelper\').value;');newhelper.innerHTML="<option value=\'\'>Select a protect reason</option>"+"<option value=\'[[WP:SALT]] - Protecting a page that has been repeatedly re-created after proper deletion or as a result of a policy violation.\'>Salting a page</option>"+"<option value=\'[[WP:TPP]] - Page fully protected to stop an edit war, to hold a history review during a deletion review, or to prevent a disruptive user from using his or her talk page as an abuse tool.\'>Full protection</option>"+"<option value=\'[[WP:TPP]] - Page protected from being moved as a result of on-going page-move vandalism, an active page name dispute, or it is a high-visibility page that has no reason to be moved.\'>Move protection</option>"+"<option value=\'[[WP:TPP]] - Cascading protection to secure transcluded pages, either due to high visibility or to prevent from article recreation.\'>Cascading protection</option>"+"<option value=\'[[WP:TPP]] - Semi protected page against new and unregistered users due to heavy and continued vandalism\'>Semi protection</option>"+"<option value=\'\'>---------------</option>"+"<option value=\'[[WP:PROT]] - Manually unprotecting page\'>Unprotecting</option>";if(protect_table){varfirsttbody=protect_table.getElementsByTagName('tbody')[0];if(firsttbody){varfirstrow=firsttbody.getElementsByTagName('tr')[0];if(firstrow){varnewcell=firstrow.insertCell(0);newcell.setAttribute('rowspan','1');newcell.setAttribute('colspan','3');newcell.appendChild(newhelper);newhelper.setAttribute('size','8');}}}}void0</pre>