User:Picaroon/monobook.js

//

// User:Lupin/popups.js mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

// Script from User:Lupin/recent2.js mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js'             + '&action=raw&ctype=text/javascript&dontcountme=s');

// User:Zocky/PicturePopups.js mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Zocky/PicturePopups.js'             + '&action=raw&ctype=text/javascript');

// User:Zocky/SearchBox.js mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.js'             + '&action=raw&ctype=text/javascript'); // User:Zocky/LinkComplete.js mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Zocky/LinkComplete.js'             + '&action=raw&ctype=text/javascript');

// User:Zocky/AutoComplete.js mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Zocky/AutoComplete.js'             + '&action=raw&ctype=text/javascript');

// Modified version of User:^demon/csd.js if (wgAction == 'delete') { var csdDeleteForm = { FillSelect:function(sel, arr){ if(arr && arr.length>0){ if(arr.length>1){ var FirstOpt = new Option("CSD Reasons", ""); // catches stupid IE error if(FirstOpt.innerHTML != "CSD Reasons"){ FirstOpt.innerHTML = "CSD Reasons"; }							sel.appendChild(FirstOpt); sel.options[0].style.color = "gray" }						sel.disabled = false; for(var i=0;i<arr.length;i++){ var opt = new Option(arr[i].display, arr[i].value); // catches stupid IE error if(opt.innerHTML != arr[i].display){ opt.innerHTML = arr[i].display; }							sel.appendChild(opt); }					}else{ sel.options[0] = new Option("No Options Available", ""); // catches stupid IE error if(sel.options[0].innerHTML != "No Options Available"){ sel.options[0].innerHTML = "No Options Available"; }						sel.disabled = true; return false; }					return true; },                               ValueArray:[ {"value":"CSD G1","display":"G1 - Nonsense"}, {"value":"CSD G2","display":"G2 - Test Pages"}, {"value":"CSD G3","display":"G3 - Pure Vandalism"}, {"value":"CSD G4","display":"G4 - Recreated Deleted"}, {"value":"CSD G5","display":"G5 - Banned User"}, {"value":"CSD G6","display":"G6 - Housekeeping"}, {"value":"CSD G7","display":"G7 - Author Request"}, {"value":"CSD G8","display":"G8 - Talk Page"}, {"value":"CSD G9","display":"G9 - Office Actions"}, {"value":"CSD G10","display":"G10 - Attack Pages"}, {"value":"CSD G11","display":"G11 - Advertising"}, {"value":"CSD G12","display":"G12 - Copyright"}, {"value":"CSD A1","display":"A1 - No Context"}, {"value":"CSD A2","display":"A2 - Foreign Language"}, {"value":"CSD A3","display":"A3 - No Content"}, {"value":"CSD A5","display":"A5 - Transwikied"}, {"value":"CSD A7","display":"A7 - Other"}, {"value":"CSD R1","display":"R1 - Bad Target"}, {"value":"CSD R2","display":"R2 - Crossnamespace"}, {"value":"CSD R3","display":"R3 - Bad Typo"}, {"value":"CSD I1","display":"I1 - Redundant"}, {"value":"CSD I2","display":"I2 - Corrupt/Empty"}, {"value":"CSD I3","display":"I3 - Improper License"}, {"value":"CSD I4","display":"I4 - Lack of License"}, {"value":"CSD I5","display":"I5 - Unused Unfree"}, {"value":"CSD I6","display":"I6 - No Fair Use"}, {"value":"CSD I7","display":"I7 - Invalid Fair Use"}, {"value":"CSD I8","display":"I8 - On Commons"}, {"value":"CSD C1","display":"C1 - Empty"}, {"value":"CSD C2","display":"C2 - Speedy Rename"}, {"value":"CSD C3","display":"C3 - Template"}, {"value":"CSD U1","display":"U1 - User Request"}, {"value":"CSD U2","display":"U2 - No User"}, {"value":"CSD U3","display":"U3 - Fair Use Gallery"}, {"value":"CSD T1","display":"T1 - Divisive"}, {"value":"CSD P1","display":"P1 - As article"}, {"value":"CSD P2","display":"P2 - Underpopulated"}, {"value":"Expired prod","display":"Prod close"} ],				//**************************** attaching function ***************************************** // got thIS super handi function from http://www.scottandrew.com he is pretty dang smart ** //*****************************************************************************************				addEvent:function(obj, evType, fn, useCapture){ //alert(obj); if (obj.addEventListener){ obj.addEventListener(evType, fn, useCapture); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r;					} else { alert("Handler could not be attached"); }				}			}			function addSelectAfter{ var obj = document.getElementById('wpReason') || document.getElementById('wpComment'); // create select using included array var sel = document.createElement("SELECT"); csdDeleteForm .FillSelect(sel, csdDeleteForm .ValueArray); // name it				sel.name = "csdOptions"; sel.id = "csdOptions"; sel.style.marginLeft = "10px"; csdDeleteForm .addEvent(sel, "change", csdChangeBox, false); // check for next sibling and insert before it or at the end if(obj.nextSibling){ obj.parentNode.insertBefore(sel,obj.nextSibling); }else{ obj.parentNode.appendChild(sel); }			}			try{ // add one on load csdDeleteForm.addEvent(window, "load", addSelectAfter, false); }catch(err){} } function csdChangeBox { var obj = document.getElementById('wpReason') || document.getElementById('wpComment'); obj.value = document.getElementById('csdOptions').value; }

/**** Helper tools ****/ mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'  + '&action=raw&ctype=text/javascript');

// UTC clock mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/UTCclock.js'             + '&action=raw&ctype=text/javascript'); //

// This will add an [edit] link at the top of all pages except preview pages and the main page // by User:Pile0nades

// Add an [edit] link to pages $(function {  // if this is preview page or generated page, stop  if( document.getElementById("wikiPreview") || document.getElementById("histlegend‎") || document.getElementById("difference‎") || document.getElementById("watchdetails") || document.getElementById("ca-viewsource") || window.location.href.indexOf("/wiki/Special:") != -1 ) {   if(window.location.href.indexOf("&action=edit&section=0") != -1) {      document.getElementById("wpSummary").value = "/* Intro */ ";    }    return;  };

// get the page title var pageTitle = wgPageName;

// create div and set innerHTML to link var divContainer = document.createElement("div"); divContainer.innerHTML = ' [edit intro] ';

// insert divContainer into the DOM below the h1 if(window.location.href.indexOf("&action=edit") == -1) { document.getElementById("content").insertBefore(divContainer, document.getElementsByTagName("h1")[0]); }

});

//Jude's Automagic Deletion $(function {		if(queryString("submitdelete")=="true") document.forms[0].wpConfirmB.click;	}); function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { }		}		return null; };

//VoA stuff importScript('User:Voice_of_All/Addtabs/monobook.js'); importScript('User:Voice_of_All/replacetxt.js'); importScript('User:Voice_of_All/Specialadmin/monobook.js'); importScript('User:Voice_of_All/Bureaucrat/monobook.js'); importScript('User:Voice_of_All/History/monobook.js'); importScript('User:Voice_of_All/Sleeper/monobook.js'); importScript('User:Voice_of_All/Adminwarnings/monobook.js'); importScript('User:Voice_of_All/Deletion/monobook.js'); importScript('User:Voice_of_All/Google/monobook.js');

//