User:Mdd4696/monobook.js

//

/*************************** * BEGIN LIBRARY FUNCTIONS * ***************************/

function addlilink( tabs, url, name, id, title, key ) { var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {		if(key && title) {		   ta[id] = [key, title]; }				else if(key) {		   ta[id] = [key, '']; }		else if(title) {		   ta[id] = ['', title]; }	}	// re-render the title and accesskeys from existing code in wikibits.js	akeytt; return li; }

function addTab( url, name, id, title, key ) { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key); }

function addToolboxLink( url, name, id ) { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; addlilink(tb, url, name, id); }

/************************* * END LIBRARY FUNCTIONS * *************************/

/******************************** * BEGIN IMAGE AUTOTAGGER      * * User:Mdd4696/monobook.js * ********************************/

/*************************** * BEGIN LIBRARY FUNCTIONS * ***************************/

function addlilink( tabs, url, name, id, title, key ) { var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {               if(key && title) {                   ta[id] = [key, title]; }                               else if(key) {                   ta[id] = [key, '']; }               else if(title) {                   ta[id] = ['', title]; }       }        // re-render the title and accesskeys from existing code in wikibits.js        akeytt; return li; }

function addTab( url, name, id, title, key ) { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key); }

function addToolboxLink( url, name, id ) { var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0]; addlilink(tb, url, name, id); }

/************************* * END LIBRARY FUNCTIONS * *************************/

/******************************** * BEGIN IMAGE AUTOTAGGER      * * User:Mdd4696/monobook.js * ********************************/

// Global variables

var messageTimeoutId; var fastTaggerBoxFlag = false; var fastTaggerTabFlag = false;

var summaryDefaultText = "Thousands of images have no copyright tags. You can help!";

var imageTags = new Array; imageTags[ "Common" ] = new Array; imageTags[ "Public Domain" ] = new Array; imageTags[ "Free" ] = new Array; imageTags[ "Fair Use" ] = new Array;

imageTags[ "Common" ][ "No Source" ] = ""; imageTags[ "Common" ][ "No License" ] = ""; imageTags[ "Common" ][ "Copyvio" ] = ""; imageTags[ "Common" ][ "Missing Image" ] = "";

imageTags[ "Public Domain" ][ "CopyrightedFreeUse" ] = ""; imageTags[ "Public Domain" ][ "Gray's Anatomy plate" ] = ""; imageTags[ "Public Domain" ][ "Iraqcopyright" ] = ""; imageTags[ "Public Domain" ][ "Military-Insignia" ] = ""; imageTags[ "Public Domain" ][ "money-US" ] = ""; imageTags[ "Public Domain" ][ "PD" ] = ""; imageTags[ "Public Domain" ][ "PD-8BS" ] = ""; imageTags[ "Public Domain" ][ "PD-AR-Photo" ] = ""; imageTags[ "Public Domain" ][ "PD-art" ] = ""; imageTags[ "Public Domain" ][ "PD-art-life-50" ] = ""; imageTags[ "Public Domain" ][ "PD-art-life-70" ] = ""; imageTags[ "Public Domain" ][ "PD-art-US" ] = ""; imageTags[ "Public Domain" ][ "PD-Australia" ] = ""; imageTags[ "Public Domain" ][ "PD-Australia-CC" ] = ""; imageTags[ "Public Domain" ][ "PD-AustraliaGov" ] = ""; imageTags[ "Public Domain" ][ "PD-BritishGov" ] = ""; imageTags[ "Public Domain" ][ "PD-BY-exempt" ] = ""; imageTags[ "Public Domain" ][ "PD-Canada" ] = ""; imageTags[ "Public Domain" ][ "PD-Catholic" ] = ""; imageTags[ "Public Domain" ][ "PD-China" ] = ""; imageTags[ "Public Domain" ][ "PD-CzechGov" ] = ""; imageTags[ "Public Domain" ][ "PD-flag-100" ] = ""; imageTags[ "Public Domain" ][ "PD-flag-50" ] = ""; imageTags[ "Public Domain" ][ "PD-flag-70" ] = ""; imageTags[ "Public Domain" ][ "PD-flag-US" ] = ""; imageTags[ "Public Domain" ][ "PD-GWPDA" ] = ""; imageTags[ "Public Domain" ][ "PD-India" ] = ""; imageTags[ "Public Domain" ][ "PD-ineligible" ] = ""; imageTags[ "Public Domain" ][ "PD-Iran" ] = ""; imageTags[ "Public Domain" ][ "PD-link" ] = ""; imageTags[ "Public Domain" ][ "PD-LithuaniaGov" ] = ""; imageTags[ "Public Domain" ][ "PD-Meyers" ] = ""; imageTags[ "Public Domain" ][ "PD-old" ] = ""; imageTags[ "Public Domain" ][ "PD-old-50" ] = ""; imageTags[ "Public Domain" ][ "PD-old-70" ] = ""; imageTags[ "Public Domain" ][ "PD-Open Clipart Library" ] = ""; imageTags[ "Public Domain" ][ "PD-Pakistan" ] = ""; imageTags[ "Public Domain" ][ "PD-PakistanGov" ] = ""; imageTags[ "Public Domain" ][ "PD-PCL" ] = ""; imageTags[ "Public Domain" ][ "PD-PDphoto.org" ] = ""; imageTags[ "Public Domain" ][ "PD-Philippines" ] = ""; imageTags[ "Public Domain" ][ "PD-PhilippinesGov" ] = ""; imageTags[ "Public Domain" ][ "PD-Poland" ] = ""; imageTags[ "Public Domain" ][ "PD-PolishGov" ] = ""; imageTags[ "Public Domain" ][ "PD-release" ] = ""; imageTags[ "Public Domain" ][ "PD-RU-exempt" ] = ""; imageTags[ "Public Domain" ][ "PD-SAGov" ] = ""; imageTags[ "Public Domain" ][ "PD-self" ] = ""; imageTags[ "Public Domain" ][ "PD-stamp" ] = ""; imageTags[ "Public Domain" ][ "PD-UA-exempt" ] = ""; imageTags[ "Public Domain" ][ "PD-user" ] = ""; imageTags[ "Public Domain" ][ "PD-USSR" ] = ""; imageTags[ "Public Domain" ][ "PD-Vardion" ] = "";

imageTags[ "Free" ][ "ABr" ] = ""; imageTags[ "Free" ][ "AMI" ] = ""; imageTags[ "Free" ][ "Attribution" ] = ""; imageTags[ "Free" ][ "BSD" ] = ""; imageTags[ "Free" ][ "BSDu" ] = ""; imageTags[ "Free" ][ "CACTVSGIF" ] = ""; imageTags[ "Free" ][ "cc-by" ] = ""; imageTags[ "Free" ][ "cc-by-2.0" ] = ""; imageTags[ "Free" ][ "cc-by-2.0" ] = ""; imageTags[ "Free" ][ "cc-by-2.0-map" ] = ""; imageTags[ "Free" ][ "cc-by-2.0-map-of" ] = ""; imageTags[ "Free" ][ "cc-by-2.5" ] = ""; imageTags[ "Free" ][ "cc-by-sa" ] = ""; imageTags[ "Free" ][ "cc-by-sa-2.0" ] = ""; imageTags[ "Free" ][ "cc-by-sa-2.0-kr" ] = ""; imageTags[ "Free" ][ "cc-by-sa-2.5" ] = ""; imageTags[ "Free" ][ "cc-sa" ] = ""; imageTags[ "Free" ][ "CopyrightedFreeUse" ] = ""; imageTags[ "Free" ][ "CopyrightedFreeUse-Link" ] = ""; imageTags[ "Free" ][ "CopyrightedFreeUse-User" ] = ""; imageTags[ "Free" ][ "CopyrightedFreeUseProvidedThat" ] = ""; imageTags[ "Free" ][ "CrownCopyright" ] = ""; imageTags[ "Free" ][ "EU image" ] = ""; imageTags[ "Free" ][ "FAL" ] = ""; imageTags[ "Free" ][ "FinnishDefenceForces" ] = ""; imageTags[ "Free" ][ "Flphoto" ] = ""; imageTags[ "Free" ][ "GermanGov" ] = ""; imageTags[ "Free" ][ "GFDL 1.2" ] = ""; imageTags[ "Free" ][ "GFDL" ] = ""; imageTags[ "Free" ][ "GFDL-invariants" ] = ""; imageTags[ "Free" ][ "GFDL-OpenGeoDB" ] = ""; imageTags[ "Free" ][ "GFDL-retouched" ] = ""; imageTags[ "Free" ][ "GFDL-self" ] = ""; imageTags[ "Free" ][ "GFDL-small" ] = ""; imageTags[ "Free" ][ "GPL" ] = ""; imageTags[ "Free" ][ "LearningandSkillsCouncilCopyright" ] = ""; imageTags[ "Free" ][ "LGPL" ] = ""; imageTags[ "Free" ][ "MIT" ] = ""; imageTags[ "Free" ][ "money-EU" ] = ""; imageTags[ "Free" ][ "MosNews" ] = ""; imageTags[ "Free" ][ "NationalAuditOfficeCopyright" ] = ""; imageTags[ "Free" ][ "NHSCopyright" ] = ""; imageTags[ "Free" ][ "No rights reserved" ] = ""; imageTags[ "Free" ][ "NZCrownCopyright" ] = ""; imageTags[ "Free" ][ "PD-NZSection27" ] = ""; imageTags[ "Free" ][ "Sejm" ] = ""; imageTags[ "Free" ][ "SocEur" ] = ""; imageTags[ "Free" ][ "Trainweb" ] = ""; imageTags[ "Free" ][ "WorldCoin" ] = "";

imageTags[ "Fair Use" ][ "Albumcover" ] = ""; imageTags[ "Fair Use" ][ "art" ] = ""; imageTags[ "Fair Use" ][ "Boardgamecover" ] = ""; imageTags[ "Fair Use" ][ "Bookcover" ] = ""; imageTags[ "Fair Use" ][ "Comiccover" ] = ""; imageTags[ "Fair Use" ][ "Comicpanel" ] = ""; imageTags[ "Fair Use" ][ "Comicscene" ] = ""; imageTags[ "Fair Use" ][ "Digimonimage" ] = ""; imageTags[ "Fair Use" ][ "DisneyAttractionPoster" ] = ""; imageTags[ "Fair Use" ][ "DisneyLogo" ] = ""; imageTags[ "Fair Use" ][ "DVDcover" ] = ""; imageTags[ "Fair Use" ][ "Eventposter" ] = ""; imageTags[ "Fair Use" ][ "Fairusein" ] = ""; imageTags[ "Fair Use" ][ "film-screenshot" ] = ""; imageTags[ "Fair Use" ][ "game-screenshot" ] = ""; imageTags[ "Fair Use" ][ "Gamecover" ] = ""; imageTags[ "Fair Use" ][ "hqfl_logos" ] = ""; imageTags[ "Fair Use" ][ "icon" ] = ""; imageTags[ "Fair Use" ][ "linux-software-screenshot" ] = ""; imageTags[ "Fair Use" ][ "Logo" ] = ""; imageTags[ "Fair Use" ][ "mac-software-screenshot" ] = ""; imageTags[ "Fair Use" ][ "Magazinecover" ] = ""; imageTags[ "Fair Use" ][ "Movieposter" ] = ""; imageTags[ "Fair Use" ][ "Music sample" ] = ""; imageTags[ "Fair Use" ][ "musicpromo-screenshot" ] = ""; imageTags[ "Fair Use" ][ "Newspapercover" ] = ""; imageTags[ "Fair Use" ][ "Olympics-logo" ] = ""; imageTags[ "Fair Use" ][ "ParliamentofAustralia" ] = ""; imageTags[ "Fair Use" ][ "Pokeimage" ] = ""; imageTags[ "Fair Use" ][ "Politicalposter" ] = ""; imageTags[ "Fair Use" ][ "Promophoto" ] = ""; imageTags[ "Fair Use" ][ "Promotional" ] = ""; imageTags[ "Fair Use" ][ "radiologo" ] = ""; imageTags[ "Fair Use" ][ "scoutlogo" ] = ""; imageTags[ "Fair Use" ][ "Screenshot" ] = ""; imageTags[ "Fair Use" ][ "smithsonian" ] = ""; imageTags[ "Fair Use" ][ "software-screenshot" ] = ""; imageTags[ "Fair Use" ][ "sports-logo" ] = ""; imageTags[ "Fair Use" ][ "Sportsposter" ] = ""; imageTags[ "Fair Use" ][ "Standard test" ] = ""; imageTags[ "Fair Use" ][ "TIME" ] = "June 29, 2024"; imageTags[ "Fair Use" ][ "tv-logo" ] = ""; imageTags[ "Fair Use" ][ "tv-program-logo" ] = ""; imageTags[ "Fair Use" ][ "tv-screenshot" ] = ""; imageTags[ "Fair Use" ][ "USPSstamp" ] = ""; imageTags[ "Fair Use" ][ "Video tape cover" ] = ""; imageTags[ "Fair Use" ][ "web-screenshot" ] = ""; imageTags[ "Fair Use" ][ "web-software-screenshot" ] = ""; imageTags[ "Fair Use" ][ "wikipedia-screenshot" ] = ""; imageTags[ "Fair Use" ][ "windows-software-screenshot" ] = ""; imageTags[ "Fair Use" ][ "YuGiOhimage" ] = "";

var generalMessages = new Array (       "Wunderbar!", "That's it!", "Keep going!", "Alright now!", "Superb!",        "Amazing!", "Keep it coming.", "Wow. Just wow.", "Speed demon!",        "You're on fire!", ":-)", "Sweet!", "Who's da man?", "Watch it now!", "Woo woo!", "The image tagging train is chugging along!", "Going to town!", "Zoooom!", "You like to move it, move it.", "Bot-like.", "You are the image tagging master!", "Sha-wing!", "Tired yet?", "Wrist hurt yet?", "Jolly good.", "Brilliant!", "Sacre Bleu!", "Oh. My. God. Becky, look at her tagger. It is so big.", "Tagger skillz.", "ur l33t", "Blimey!", "Gotta catch them all!", "Gooooaaaal!", "Such a good little Wikipedian.", "Faster than a speeding bullet.", "Einstein would approve.", "Ben Franklin would approve.", "Jefferson would approve.", "Washington would approve.", "Shiny!", "Double whammy!", "Home run!", "That minty fresh feeling!", "Another?", "Bingo!", "Another round!", "Please, sir, I want some more.", "So fast!", "If you were a car, I'd call you Ferrari.", "Tag. It. Tag it.", "I am a banana!", "Tickle-me tagger!", "The wonderful thing about taggers is taggers are wonderful things!", "Booyah!", "No need to thank me, just doing my job.", "Bagged and tagged." );

var sourceMessages = new Array (       "The internet is for porn.", "I found it under the couch.",        "Where did you say you were from?", "Lost children that way ->",        "It came oughtta nowhere!", "In Soviet Russia, the images tag *you*!",        "Dumpster diving works wonders." );

var licenseMessages = new Array (       "Sir, I'll need to see your license and registration.", "License to kill.",        "License to thrill.", "License to ill.", "License to... oh I give up.",        "You can't get in, this is a fake id.", "The RIAA sucks.", "Freeeedom!" );

var ifdMessages = new Array (       "Down the tube...", "Get it out of here!", "I don't think so.", "Yeah, right.",        "My eyes!", "lol", "wtf", "lolwtfbbq", "Move along, nothing to see here.",        "It's real I tell ya'!", "Mmmm... delete!",        "Some say I'm deletionist, others say I'm inclusionally challenged.",        "Baloney.", "It's just one of those days.", "Nein, das ist verboten!",        "I love the smell of deletion in the morning.",        "I scream, you scream, we throw the frickin' computer out of the window.",        "Outta sight!", "Zip. Nada. Nothing.", "Kill it!",        "How do you spell bannable?", "It's peanut butter jelly time!",        "One Thousand Years of Death!", "Oh, be-have!",        "Absolutely and completely gone!",        "That's where I saw the leprechaun. He told me to burn things." );

// Tagger functions

function toggleTagger( displayFlag ) { var taggerBoxObj = document.getElementById( "taggerBox" );

if ( displayFlag ) { if ( taggerBoxObj ) { taggerBoxObj.style.display = "block"; } else { taggerBoxObj = document.createElement( "div" ); taggerBoxObj.id = "taggerBox";

taggerBoxObj.style.background = "#F9F9F9"; taggerBoxObj.style.border = "1px solid #000000"; taggerBoxObj.style.left = "50px"; taggerBoxObj.style.padding = "15px"; taggerBoxObj.style.position = "absolute"; taggerBoxObj.style.top = "50px"; taggerBoxObj.style.width = "770px"; taggerBoxObj.style.zIndex = "100";

var taggerBoxBody = ""; taggerBoxBody += "  "; taggerBoxBody += " × "; taggerBoxBody += " "; taggerBoxBody += "         "; taggerBoxBody += "         "; taggerBoxBody += "        "; taggerBoxBody += "

";                       taggerBoxBody += "         ";                        taggerBoxBody += " ";                       taggerBoxBody += "         ";                        taggerBoxBody += " ";                       taggerBoxBody += "         Uploaded by User:Mdd4696 ";                        taggerBoxBody += " ";                       taggerBoxBody += "         On 2005-10-07 ";                        taggerBoxBody += " ";                       taggerBoxBody += "         400 x 300 ";                        taggerBoxBody += " ";                       taggerBoxBody += "         300 kB ";                        taggerBoxBody += " ";                        taggerBoxBody += " ";                        taggerBoxBody += "          ";                       taggerBoxBody += "          ";                       taggerBoxBody += "          ";                       taggerBoxBody += "          Minor edit";                        taggerBoxBody += "          Watch this page";                        taggerBoxBody += "          Default summary ";                       taggerBoxBody += "          ";                       taggerBoxBody += "         ";                        taggerBoxBody += " ";                        taggerBoxObj.innerHTML = taggerBoxBody;

document.body.appendChild( taggerBoxObj ); populateSelect( document.getElementById( "tagList" ), imageTags ); }       } else { taggerBoxObj.style.display = "none"; } }

var requestTimer; var requestTimerVal;

function updateTimer { requestTimerVal += 1; document.getElementById( "imageList" ).options[ 0 ] = new Option( "Loading... " + requestTimerVal, "" ); requestTimer = setTimeout( "updateTimer;", 1000 ); }

function toggleFastTagger( eventObj, isTab ) { var eventType = eventObj.type; var mouseXPos = eventObj.clientX; var mouseYPos = eventObj.clientY;

var fastTaggerBoxObj = document.getElementById( "fastTaggerBox" );

if ( eventType == "mouseover" ) { if ( isTab ) { fastTaggerTabFlag = true; } else { fastTaggerBoxFlag = true; }

if ( fastTaggerBoxObj ) { if ( fastTaggerTabFlag ) { if ( mouseXPos < parseInt( fastTaggerBoxObj.style.left ) ) { fastTaggerBoxObj.style.left = mouseXPos + "px"; }

if ( mouseYPos > parseInt( fastTaggerBoxObj.style.top ) ) { fastTaggerBoxObj.style.top = mouseYPos + "px"; }                       }

fastTaggerBoxObj.style.display = "block"; } else { fastTaggerBoxObj = document.createElement( "div" ); fastTaggerBoxObj.id = "fastTaggerBox";

fastTaggerBoxObj.setAttribute( "onMouseOut", "toggleFastTagger( event, false );" ); fastTaggerBoxObj.setAttribute( "onMouseOver", "toggleFastTagger( event, false );" );

fastTaggerBoxObj.style.background = "#F9F9F9"; fastTaggerBoxObj.style.border = "1px solid #000000"; fastTaggerBoxObj.style.left = mouseXPos + "px"; fastTaggerBoxObj.style.padding = "15px"; fastTaggerBoxObj.style.position = "absolute"; fastTaggerBoxObj.style.top = mouseYPos + "px"; fastTaggerBoxObj.style.zIndex = "101";

var retVal = ""; retVal += ""; retVal += " "; retVal += "<input type='button' value='No License' style='width: 150px;' onClick='fastTagImage( \"\", \"licensing\", document.getElementById( \"customSummary\" ).value );' />"; retVal += " "; retVal += "<input type='button' value='IFD' style='width: 150px;' onClick='fastTagImage( \"\", \"top\", document.getElementById( \"customSummary\" ).value );' />"; retVal += "

";                       retVal += "<input type='checkbox' id='summaryCheckbox' checked='true' onClick='toggleFastTaggerSummary;' /> Default summary";                        retVal += " ";                       retVal += "<input type='text' id='customSummary' value='" + summaryDefaultText + "' maxlength='200' style='display: none; width: 150px;' />";                        fastTaggerBoxObj.innerHTML = retVal;

document.body.appendChild( fastTaggerBoxObj ); }       } else if ( eventType == "mouseout" ) { if ( isTab ) { fastTaggerTabFlag = false; } else { fastTaggerBoxFlag = false; }

if ( ! fastTaggerTabFlag && ! fastTaggerBoxFlag ) { document.getElementById( "fastTaggerBox" ).style.display = "none"; }       } }

function toggleTaggerSummary( summaryField, defaultFlag ) { if ( defaultFlag ) { summaryField.value = summaryDefaultText; } }

function toggleFastTaggerSummary { if ( document.getElementById( "summaryCheckbox" ).checked ) { document.getElementById( "customSummary" ).style.display = "none"; document.getElementById( "customSummary" ).value = "Thousands of images have no copyright tags. You can help!"; } else { document.getElementById( "customSummary" ).style.display = "inline"; } }

function loadImage( imageReference ) {

if ( imageReference != "" ) {

document.getElementById( "imageThumb" ).src = getRawImageUrl( "en", getImageName( imageReference ), 200 ); document.getElementById( "taggerText" ).value = "Loading...";

var xmlhttp = new XMLHttpRequest; xmlhttp.open( "GET", "http://en.wikipedia.org/w/index.php?title=" + document.getElementById( "imageList" ).value + "&action=edit", true ); xmlhttp.onreadystatechange = function { if ( xmlhttp.readyState == 4 ) { if ( xmlhttp.status == 200 ) {

// Set image name, uploader, date, etc.

var imageTextExp = /name="wpTextbox1" id="wpTextbox1"[^]*cols='80' >([^]*)<\/textarea>/g; document.getElementById( "taggerText" ).value = imageTextExp.exec( xmlhttp.responseText )[ 1 ];

} else if ( xmlhttp.status == 404 ) { alert( "Error 404: Document not found" ); } else { alert( "Unspecified error: " + xmlhttp.status ); }

xmlhttp.abort; }               }                xmlhttp.send( null );

} else {

alert( "Please select an image" );

}

}

function loadImageFromList { var selectedIndex = document.getElementById( "imageList" ).selectedIndex;

if ( selectedIndex >= 0 ) { loadImage( document.getElementById( "imageList" ).options[ selectedIndex ].value ); }

}

function loadList( pageName ) { var xmlhttp = new XMLHttpRequest; xmlhttp.open( "GET", "http://en.wikipedia.org/w/index.php?title=" + pageName + "&action=raw&ctype=text/javascript", true ); xmlhttp.onreadystatechange = function { if ( xmlhttp.readyState == 4 ) { clearTimeout( requestTimer );

if ( xmlhttp.status == 200 ) { var rawListText = xmlhttp.responseText;

// Remove Wiki formatting rawListText = rawListText.replace( /# \[\[:/g, "" ); rawListText = rawListText.replace( /\]\]/g, "" );

// Escape any remaining special characters //var specials = [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\" ]; //rawListText = rawListText.replace( new RegExp( "(\\" + specials.join( "|\\" ) + ")", "g" ), "\\$1" );

var listArr = rawListText.split( "\n" ); for ( var i = 0; i < listArr.length; i++ ) { document.getElementById( "imageList" ).options[ i ] = new Option( listArr[ i ], listArr[ i ] ); }

document.getElementById( "imageList" ).selectedIndex = 0; loadImageFromList; } else if ( xmlhttp.status == 404 ) { alert( "Error 404: Document not found" ); } else { alert( "Unspecified error: " + xmlhttp.status ); }               }        }        xmlhttp.send( null ); document.getElementById( "imageList" ).options.length = 0; document.getElementById( "imageList" ).options[ 0 ] = new Option( "Loading... 0", "" ); requestTimerVal = 0; requestTimer = setTimeout( "updateTimer;", 1000 ); }

function populateSelect( selectObj, optionArr ) { var optionCounter = 0;

selectObj.options[ optionCounter ] = new Option( "Select a tag", null ); selectObj.options[ optionCounter ].style.color = "#CCCCCC"; selectObj.options[ optionCounter ].style.fontStyle = "italic"; optionCounter++;

for ( var tagCategory in optionArr ) { selectObj.options[ optionCounter ] = new Option( tagCategory, null ); selectObj.options[ optionCounter ].style.fontWeight = "bold"; optionCounter++;

for ( var tag in optionArr[ tagCategory ] ) { selectObj.options[ optionCounter ] = new Option( tag, optionArr[ tagCategory ][ tag ] ); selectObj.options[ optionCounter ].style.marginLeft = "10px"; optionCounter++; }       } }

/* *       Name: insertTag * Description: Inserts tag template into the edit box * Parameters: tag - Tag text *             location - Where to place tag (top, summary, *                         licensing, bottom) *    Returns: Boolean value indicating success */ function insertTag( textFieldObj, tag, location ) { var retVal = true; var sumTagNewline = "\n"; var sumRegExp = /=+\s*Summary\s*=+\n?/i; var licRegExp = /=+\s*Licens[a-zA-Z]+\s*=+\n?/i; var wpTextboxVal = textFieldObj.value;

// Summary heading if ( ! wpTextboxVal.match( sumRegExp ) ) { var newlines = "\n";

if ( wpTextboxVal.search( licRegExp ) == 0 ) { newlines += "\n\n"; sumTagNewline = ""; }

wpTextboxVal = "== Summary ==" + newlines + wpTextboxVal; }

// Licensing heading if ( ! wpTextboxVal.match( licRegExp ) ) { wpTextboxVal = wpTextboxVal + "\n== Licensing ==\n"; }

// Add the tag if ( tag != "null" ) { switch ( location ) { case "top": wpTextboxVal = tag + "\n\n" + wpTextboxVal; break; case "summary": wpTextboxVal = wpTextboxVal.replace( sumRegExp, "== Summary ==\n" + tag + sumTagNewline ); break; case "licensing": wpTextboxVal = wpTextboxVal.replace( licRegExp, "== Licensing ==\n" + tag + "\n" ); break; case "bottom": wpTextboxVal = wpTextboxVal + "\n" + tag; break; default: retVal = false; }       }

// Update the textarea textFieldObj.value = wpTextboxVal; return retVal; }

function tagImage( articleText, editSummary, minorCheckObj, watchCheckObj ) { var xmlhttp = new XMLHttpRequest; xmlhttp.open( "GET", "http://en.wikipedia.org/w/index.php?title=Image:TestImage.jpg&action=edit", true ); xmlhttp.onreadystatechange = function { if ( xmlhttp.readyState == 4 ) { if ( xmlhttp.status == 200 ) {

var rawPageText = xmlhttp.responseText;

var editTokenExp = /value="(.{32})" name="wpEditToken"/g; var starttimeExp = /value="(.{14})" name="wpStarttime"/g; var edittimeExp = /value="(.{14})" name="wpEdittime"/g;

formData = ""; formData += "wpScrolltop="; formData += "&wpEditToken=" + editTokenExp.exec( rawPageText )[ 1 ]; formData += "&wpSection="; formData += "&wpStarttime=" + starttimeExp.exec( rawPageText )[ 1 ]; formData += "&wpEdittime=" + edittimeExp.exec( rawPageText )[ 1 ]; formData += "&wpTextbox1=" + articleText; formData += "&wpSummary=" + editSummary; formData += "&wpMinoredit=" + minorCheckObj.checked; formData += "&wpWatchthis=" + watchCheckObj.checked;

var formSubmitter = new XMLHttpRequest; formSubmitter.open( "POST", "/w/index.php?title=Image:TestImage.jpg&action=submit", true ); formSubmitter.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" ); formSubmitter.onreadystatechange = function { if ( formSubmitter.readyState == 4 ) { if ( formSubmitter.status == 200 ) { document.getElementById( "imageList" ).options[ document.getElementById( "imageList" ).selectedIndex ] = null; document.getElementById( "imageList" ).selectedIndex = 0; loadImageFromList; } else { alert( "There was a " + formSubmitter.status + " error :(" );                                               }

formSubmitter.abort; }                               }                                formSubmitter.send( formData );

} else if ( xmlhttp.status == 404 ) { alert( "Error 404: Document not found" ); } else { alert( "Unspecified error: " + xmlhttp.status ); }

xmlhttp.abort; }       }        xmlhttp.send( null ); }

/** * http://en.wikipedia.org/wiki/Image:TestImage.jpg - imageUrl * * en - languageCode * Image: - imageNamespace * TestImage.jpg - imageName * Image:TestImage.jpg - imageReference * http://en.wikipedia.org/wiki/ - imagePath * * http://upload.wikimedia.org/wikipedia/en/8/84/TestImage.jpg - rawImageUrl * * 8/84/ - imageNameHash * http://upload.wikimedia.org/wikipedia/en/8/84/ - rawImagePath */

/** * language - ISO 639 code */ function getRawImageUrl( languageCode, imageName, imageWidth ) {

var rawImageUrl = "http://upload.wikimedia.org/wikipedia/" + languageCode + "/"; var imageNameHash = getImageNameHash( imageName );

if ( imageWidth > -1 ) { rawImageUrl += "thumb/" + imageNameHash + imageName + "/" + imageWidth + "px-" + imageName; } else { rawImageUrl += imageNameHash + imageName; }

return rawImageUrl;

}

/** * imageReference - Namespace:Imagename.ext */ function getImageName( imageReference ) {

return imageReference.substring( imageReference.indexOf( ":" ) + 1 );

}

/** * */ function getImageNameHash( imageName ) {

var imageNameHash;

imageName = decodeURI( imageName ).split( " " ).join( "_" ); imageNameHash = md5_hex( imageName );

return imageNameHash.substring( 0, 1 ) + "/" + imageNameHash.substring( 0, 2 ) + "/";

}

function xmlHttpObj {

// Private functions function doAbort { xmlHttpRequest.abort; }

function doGetAllResponseHeaders { xmlHttpRequest.getAllResponseHeaders; }

function doGetResponseHeader( httpHeader ) { xmlHttpRequest.getResponseHeader( httpHeader ); }

function doOpen( httpMethod, httpUrl, httpAsync, httpUsername, httpPassword ) { xmlHttpRequest.open( httpMethod, httpUrl, httpAsync, httpUsername, httpPassword ); }

function doSend( httpBody ) { xmlHttpRequest.send( httpBody ); }

function doSetRequestHeader( httpHeader, httpValue ) { xmlHttpRequest.setRequestHeader( httpHeader, httpValue ); }

// Private variables var self = this; var xmlHttpRequest = new XMLHttpRequest;

// Privileged variables this.readyState    = function { return xmlHttpRequest.readyState;     }; this.responseBody  = function { return xmlHttpRequest.responseBody;   }; this.responseStream = function { return xmlHttpRequest.responseStream; }; this.responseText  = function { return xmlHttpRequest.responseText;   }; this.responseXML   = function { return xmlHttpRequest.responseXML;    }; this.status        = function { return xmlHttpRequest.status;         }; this.statusText    = function { return xmlHttpRequest.statusText;     };

// Privileged methods this.abort                = doAbort; this.getAllResponseHeaders = doGetAllResponseHeaders; this.getResponseHeader    = doGetResponseHeader; this.open                 = doOpen; this.send                 = doSend; this.setRequestHeader     = doSetRequestHeader;

// Public variables this.timeout; this.onreadystatechange;

return true;

}

/******************************************************************************
 * http://www.brainjar.com/dhtml/drag/                                       *
 * GNU GPL (http://www.brainjar.com/terms.asp)                               *

// Global object to hold drag information. var dragObj = new Object; dragObj.zIndex = 0;

function dragStart( event, id ) { var mouseXPos; var mouseYPos;

if ( id ) { dragObj.elNode = document.getElementById( id ); } else { dragObj.elNode = event.target; }

mouseXPos = event.clientX + window.scrollX; mouseYPos = event.clientY + window.scrollY;

// Save starting positions of cursor and element. dragObj.cursorStartX = mouseXPos; dragObj.cursorStartY = mouseYPos; dragObj.elStartLeft = parseInt( dragObj.elNode.style.left, 10 ); dragObj.elStartTop = parseInt( dragObj.elNode.style.top, 10 );

if ( isNaN( dragObj.elStartLeft ) ) { dragObj.elStartLeft = 0; }       if ( isNaN( dragObj.elStartTop ) ) { dragObj.elStartTop = 0; }

// Capture mousemove and mouseup events on the page. document.addEventListener( "mousemove", dragGo, true); document.addEventListener( "mouseup", dragStop, true); event.preventDefault; }

function dragGo( event ) { var mouseXPos; var mouseYPos;

// Get cursor position with respect to the page. mouseXPos = event.clientX + window.scrollX; mouseYPos = event.clientY + window.scrollY;

// Move drag element by the same amount the cursor has moved. dragObj.elNode.style.left = ( dragObj.elStartLeft + mouseXPos - dragObj.cursorStartX ) + "px"; dragObj.elNode.style.top = ( dragObj.elStartTop  + mouseYPos - dragObj.cursorStartY ) + "px";

event.preventDefault; }

function dragStop(event) { // Clear the drag element global. dragObj.elNode = null;

// Stop capturing mousemove and mouseup events. document.removeEventListener( "mousemove", dragGo, true); document.removeEventListener( "mouseup", dragStop, true); }

/******************************************************************************/

/* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.2-alpha Copyright (C) Paul Johnston 1999 - 2005 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */

/* * Configurable variables. You may need to tweak these to be compatible with * the server-side, but the defaults work in most cases. */ var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase       */ var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance  */

/* * These are the functions you will usually want to call * They take string arguments and return either hex or base-64 encoded strings */ function hex_md5(s)   { return rstr2hex(rstr_md5(str2rstr_utf8(s))); } function b64_md5(s)   { return rstr2b64(rstr_md5(str2rstr_utf8(s))); } function any_md5(s, e) { return rstr2any(rstr_md5(str2rstr_utf8(s)), e); } function hex_hmac_md5(k, d) { return rstr2hex(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); } function b64_hmac_md5(k, d) { return rstr2b64(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); } function any_hmac_md5(k, d, e) { return rstr2any(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d)), e); }

/* * Perform a simple self-test to see if the VM is working */ function md5_vm_test { return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; }

/* * Calculate the MD5 of a raw string */ function rstr_md5(s) { return binl2rstr(binl_md5(rstr2binl(s), s.length * 8)); }

/* * Calculate the HMAC-MD5, of a key and some data (raw strings) */ function rstr_hmac_md5(key, data) { var bkey = rstr2binl(key); if(bkey.length > 16) bkey = binl_md5(bkey, key.length * 8);

var ipad = Array(16), opad = Array(16); for(var i = 0; i < 16; i++) {   ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; }

var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8); return binl2rstr(binl_md5(opad.concat(hash), 512 + 128)); }

/* * Convert a raw string to a hex string */ function rstr2hex(input) { var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var output = ""; var x; for(var i = 0; i < input.length; i++) {   x = input.charCodeAt(i); output += hex_tab.charAt((x >>> 4) & 0x0F) + hex_tab.charAt( x        & 0x0F); } return output; }

/* * Convert a raw string to a base-64 string */ function rstr2b64(input) { var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var output = ""; var len = input.length; for(var i = 0; i < len; i += 3) {   var triplet = (input.charCodeAt(i) << 16) | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0) | (i + 2 < len ? input.charCodeAt(i+2)     : 0); for(var j = 0; j < 4; j++) {     if(i * 8 + j * 6 > input.length * 8) output += b64pad; else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); } }  return output; }

/* * Convert a raw string to an arbitrary string encoding */ function rstr2any(input, encoding) { var divisor = encoding.length; var i, j, q, x, quotient;

/* Convert to an array of 16-bit big-endian values, forming the dividend */ var dividend = Array(Math.ceil(input.length / 2)); for(i = 0; i < dividend.length; i++) {   dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1); }

/*  * Repeatedly perform a long division. The binary array forms the dividend, * the length of the encoding is the divisor. Once computed, the quotient * forms the dividend for the next step. All remainders are stored for later * use. */ var full_length = Math.ceil(input.length * 8 /                                    (Math.log(encoding.length) / Math.log(2))); var remainders = Array(full_length); for(j = 0; j < full_length; j++) {   quotient = Array; x = 0; for(i = 0; i < dividend.length; i++) {     x = (x << 16) + dividend[i]; q = Math.floor(x / divisor); x -= q * divisor; if(quotient.length > 0 || q > 0) quotient[quotient.length] = q;   } remainders[j] = x;   dividend = quotient; }

/* Convert the remainders to the output string */ var output = ""; for(i = remainders.length - 1; i >= 0; i--) output += encoding.charAt(remainders[i]);

return output; }

/* * Encode a string as utf-8. * For efficiency, this assumes the input is valid utf-16. */ function str2rstr_utf8(input) { var output = ""; var i = -1; var x, y;

while(++i < input.length) {   /* Decode utf-16 surrogate pairs */ x = input.charCodeAt(i); y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {     x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); i++; }

/* Encode output as utf-8 */ if(x <= 0x7F) output += String.fromCharCode(x); else if(x <= 0x7FF) output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),                                   0x80 | ( x         & 0x3F)); else if(x <= 0xFFFF) output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),                                   0x80 | ((x >>> 6 ) & 0x3F),                                    0x80 | ( x         & 0x3F)); else if(x <= 0x1FFFFF) output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),                                   0x80 | ((x >>> 12) & 0x3F),                                    0x80 | ((x >>> 6 ) & 0x3F),                                    0x80 | ( x         & 0x3F)); } return output; }

/* * Encode a string as utf-16 */ function str2rstr_utf16le(input) { var output = ""; for(var i = 0; i < input.length; i++) output += String.fromCharCode( input.charCodeAt(i)       & 0xFF,                                  (input.charCodeAt(i) >>> 8) & 0xFF); return output; }

function str2rstr_utf16be(input) { var output = ""; for(var i = 0; i < input.length; i++) output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,                                  input.charCodeAt(i)        & 0xFF); return output; }

/* * Convert a raw string to an array of little-endian words * Characters >255 have their high-byte silently ignored. */ function rstr2binl(input) { var output = Array(input.length >> 2); for(var i = 0; i < output.length; i++) output[i] = 0; for(var i = 0; i < input.length * 8; i += 8) output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32); return output; }

/* * Convert an array of little-endian words to a string */ function binl2rstr(input) { var output = ""; for(var i = 0; i < input.length * 32; i += 8) output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF); return output; }

/* * Calculate the MD5 of an array of little-endian words, and a bit length. */ function binl_md5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << ((len) % 32); x[(((len + 64) >>> 9) << 4) + 14] = len;

var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878;

for(var i = 0; i < x.length; i += 16) {   var olda = a;    var oldb = b;    var oldc = c;    var oldd = d;

a = md5_ff(a, b, c, d, x[i+ 0], 7, -680876936); d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = md5_ff(a, b, c, d, x[i+ 4], 7, -176418897); d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); a = md5_ff(a, b, c, d, x[i+ 8], 7, 1770035416); d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = md5_ff(c, d, a, b, x[i+10], 17, -42063); b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); a = md5_ff(a, b, c, d, x[i+12], 7, 1804603682); d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);

a = md5_gg(a, b, c, d, x[i+ 1], 5, -165796510); d = md5_gg(d, a, b, c, x[i+ 6], 9, -1069501632); c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); a = md5_gg(a, b, c, d, x[i+ 5], 5, -701558691); d = md5_gg(d, a, b, c, x[i+10], 9, 38016083); c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); a = md5_gg(a, b, c, d, x[i+ 9], 5, 568446438); d = md5_gg(d, a, b, c, x[i+14], 9, -1019803690); c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = md5_gg(a, b, c, d, x[i+13], 5, -1444681467); d = md5_gg(d, a, b, c, x[i+ 2], 9, -51403784); c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);

a = md5_hh(a, b, c, d, x[i+ 5], 4, -378558); d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); a = md5_hh(a, b, c, d, x[i+ 1], 4, -1530992060); d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); a = md5_hh(a, b, c, d, x[i+13], 4, 681279174); d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); a = md5_hh(a, b, c, d, x[i+ 9], 4, -640364487); d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);

a = md5_ii(a, b, c, d, x[i+ 0], 6, -198630844); d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); a = md5_ii(a, b, c, d, x[i+12], 6, 1700485571); d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = md5_ii(a, b, c, d, x[i+ 8], 6, 1873313359); d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); a = md5_ii(a, b, c, d, x[i+ 4], 6, -145523070); d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);

a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return Array(a, b, c, d); }

/* * These functions implement the four basic operations the algorithm uses. */ function md5_cmn(q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); } function md5_ff(a, b, c, d, x, s, t) { return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); } function md5_gg(a, b, c, d, x, s, t) { return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); } function md5_hh(a, b, c, d, x, s, t) { return md5_cmn(b ^ c ^ d, a, b, x, s, t); } function md5_ii(a, b, c, d, x, s, t) { return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); }

/* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }

/* * Bitwise rotate a 32-bit number to the left. */ function bit_rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); }

/******************************************************************************/ function md5_hex(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); };

/******************************************************************************
 * End of not my code                                                        *

addOnloadHook( function {	addToolboxLink( "javascript:toggleTagger( true );", "Image Autotagger", "ca-showtagger" );

if ( document.title.indexOf( "Image:" ) == 0 || document.title.indexOf( "Editing Image:" ) == 0 ) { addTab( "", "tag", "ca-tagnow", "Tag this image", "" ); document.getElementById( "ca-tagnow" ).setAttribute( "onMouseOver", "toggleFastTagger( event, true );" ) document.getElementById( "ca-tagnow" ).setAttribute( "onMouseOut", "toggleFastTagger( event, true );" ) }

var xmlhttp = new XMLHttpRequest; xmlhttp.open( "GET", "http://en.wikipedia.org/w/index.php?title=Wikipedia:List_of_administrators&action=raw&ctype=text/javascript", true );

xmlhttp.onreadystatechange = function { if ( xmlhttp.readyState == 4 ) { if ( xmlhttp.status == 200 ) { for ( var i = 0; i < document.links.length && i < 5000; i++ ) { var uRegExp; var uRegExpFlag = false;

if ( document.links[ i ].title.indexOf( "User:" ) == 0 ) { uRegExp = new RegExp( document.links[ i ].title.substring( 5 ) ); uRegExpFlag = true; } else if ( document.links[ i ].title.indexOf( "User talk:" ) == 0 ) { uRegExp = new RegExp( document.links[ i ].title.substring( 10 ) ); uRegExpFlag = true; }

if ( uRegExpFlag && uRegExp.test( xmlhttp.responseText ) ) { document.links[ i ].title = "(Admin) " + document.links[ i ].title; }				}			}			xmlhttp.abort; }	}

xmlhttp.send( null );

} );

/*********************************** * END IMAGE AUTOTAGGER - DEV CODE * ***********************************/

//Interiot's javascript edit counter if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) { mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); }

//