User:Chcknwnm/monobook.js

//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'); }

// - // RC Patrol package for non-admins // Includes: 2 rollbacks and lupin's filter // - // - // God-like Monobook skin // (c) 2005 Sam Hocevar  // $Id: godmode-light.js 1029 2006-01-09 11:05:19Z sam $ // -

// - // Language support, taken from phase3/languages/* // - var nrollbacklink = ' [ rollback ] '; var cantrollback = 'Cannot revert edit; last contributor is only author of this page.'; var alreadyrolled = 'Cannot rollback last edit of $1 by $2 (Talk); someone else has edited or rolled back the page already. Last edit was by $3 (Talk). '; var nreverted = 'Reverted edits by $2 to last version by $1';

// - // Our nice Revert functions // - var gml_vandal, gml_editor, gml_url;

function Revertnorm { var l, token = '', normrevert = false; // Look for '&fakeaction=nrollback' in URL gml_url = location.pathname; l = location.search.substring(1).split('&'); for (i = 0; i < l.length; i++) { var n = l[i].indexOf('='); var name = l[i].substring(0, n); if (name == 'fakeaction') { if (l[i].substring(n + 1) == 'normalrevert') normrevert = true; } else if (name == 'user') { gml_vandal = unescape(l[i].substring(n + 1)); } else if (name == 'token') { token = unescape(l[i].substring(n + 1)); } else if (name == 'title') { gml_url += '?' + l[i]; } }  if (!normrevert) return; document.getElementById('bodyContent').innerHTML = 'Please wait, reverting edits by ' + gml_vandal + '...'; // Avoid XSS kiddies by using a special token if (token == '' || token != hex_md5(gml_url + gml_vandal + document.cookie)) { document.getElementById('bodyContent').innerHTML += ' Bad authentication token!'; return; }

gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; history_url = gml_url + '&action=history&limit=50'; document.getElementById('bodyContent').innerHTML += ' Getting article history (' + history_url + ')...'; gml_xmlhttp.open("GET", history_url, true); gml_xmlhttp.onreadystatechange = RevertStepTwonorm; gml_xmlhttp.send(null); }

function RevertStepTwonorm { if (gml_xmlhttp.readyState != 4) return; var l; var oldid; // Get the vandal and new editor names gml_vandal = gml_vandal.replace(/_/g, ' '); gml_editor = ''; // Hack for a MediaWiki bug xml = gml_xmlhttp.responseText.replace(//, ''); doc = gml_XMLParse(xml); if (!doc || !doc.getElementById('pagehistory')) { document.getElementById('bodyContent').innerHTML += ' Failed to parse XML data returned by the server.'; document.getElementById('bodyContent').innerHTML += ' Hint: try to disable both "Enable section editing by right-clicking on section titles (JavaScript)" and "Edit pages on double click (JavaScript)" in your editing preferences until a proper fix is found.'; document.getElementById('bodyContent').innerHTML += ' Dump of the unparseable page : ' + xml.replace(/&/g, '&amp;').replace(//g, '&gt;'); return; } l = doc.getElementById('pagehistory').getElementsByTagName('li'); //l = doc.selectSingleNode('//*[@id="pagehistory"]').getElementsByTagName('li'); for (i = 0; i < l.length; i++) { var name = l[i].getElementsByTagName('span')[0].getElementsByTagName('a')[0].innerHTML.replace(/_/g, ' '); if (i == 0 && name != gml_vandal) { document.getElementById('bodyContent').innerHTML += ' Error: Last editor is ' + name + ', not ' + gml_vandal + '!'; return; } else if (i > 0 && name != gml_vandal) { oldid = l[i].getElementsByTagName('input')[0].value; gml_editor = name; break; } }  if (gml_editor == '') { document.getElementById('bodyContent').innerHTML += ' Error: ' + gml_vandal + ' is the only editor!'; return; }

gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; document.getElementById('bodyContent').innerHTML += ' Getting article edit form (GET' + gml_url + '&action=edit&oldid=' + oldid + ')...'; gml_xmlhttp.open('GET', gml_url + '&action=edit&oldid=' + oldid, true); gml_xmlhttp.onreadystatechange = RevertStepThreenorm; gml_xmlhttp.send(null); }

function RevertStepThreenorm { if (gml_xmlhttp.readyState != 4) return var form, newform, l; // Insert the downloaded form in our current page, using // only hidden form inputs. doc = gml_XMLParse(gml_xmlhttp.responseText); form = doc.getElementById('editform'); newform = document.createElement('form'); l = form.getElementsByTagName('textarea'); for (i = l.length; i--; ) { var t = document.createElement('input'); t.type = 'hidden'; t.name = l[i].name; t.value = l[i].value; newform.appendChild(t); } l = form.getElementsByTagName('input'); for (i = l.length; i--; ) { if (l[i].name == 'wpSummary') { l[i].value = nreverted.replace(/\$1/g, gml_editor).replace(/\$2/g, gml_vandal); } else if (l[i].name == 'wpMinoredit') { l[i].value = '1'; } else if (l[i].name == 'wpWatchthis') { if (!l[i].checked) continue; // Donâ€™t touch the "watch" status l[i].value = "on"; } else if (l[i].name == 'wpPreview') { continue; } else if (l[i].name == 'wpDiff') { continue; }   l[i].type = 'hidden'; newform.appendChild(l[i]); } newform.name = form.name; newform.method = form.method; newform.id = form.id; newform.action = form.action; document.getElementById('bodyContent').innerHTML += ' Submitting form...'; document.getElementById('bodyContent').appendChild(newform); // Submit the form newform.submit; window.open('http://en.wikipedia.org/w/index.php?title=User talk:' + gml_vandal + '&action=edit',             'targetname',    'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); }

// - // Add revert buttons to the page // - function AddRevertButtonsnorm { var l, article = '', vandal; // Add 'revert' links to a diff page l = document.getElementById('bodyContent').getElementsByTagName('td'); for (i = 0; i < l.length; i++) { if (l[i].className == 'diff-otitle') { article = l[i].getElementsByTagName('a')[0].href.split('&')[0].replace(/[^\/]*\/\/[^\/]*/, ''); } else if (l[i].className == 'diff-ntitle') { var toplink = l[i].getElementsByTagName('a')[0].href; vandalip = l[i].getElementsByTagName('a')[1].href.split(':')[2].split('=')[1]; vandal = l[i].getElementsByTagName('a')[1].href.split(':')[2].split('&')[0]; var t = l[i].innerHTML n = t.indexOf(') ) ' + nrollbacklink + '' + nrollbacklink + '</str ' + t.substring(n + 5, t.length); }     }    }  } }

// - // Language support, taken from phase3/languages/* // - var rollbacklink = ' [ revert as vandalism ] '; var cantrollback = 'Cannot revert edit; last contributor is only author of this page.'; var alreadyrolled = 'Cannot rollback last edit of $1 by $2 (Talk); someone else has edited or rolled back the page already. Last edit was by $3 (Talk). '; var revertpage = 'Reverted vandalism by $2 to last version by $1. Please do not compromise the integrity of pages.';

// - // XMLHttpRequest support // - if (document.implementation.createDocument) { var gml_xmlparser = new DOMParser; }

function gml_XMLParse(string) { if (document.implementation.createDocument) { return gml_xmlparser.parseFromString(string, "text/xml"); } else if (window.ActiveXObject) { var gml_xmldoc = new ActiveXObject("Microsoft.XMLDOM"); gml_xmldoc.async = "false"; ret = gml_xmldoc.loadXML(string); if (!ret) return null; return gml_xmldoc.documentElement; } return null; }

var gml_xmlhttp;

function HTTPClient { var gml_http; if(window.XMLHttpRequest) { gml_http = new XMLHttpRequest; } else if (window.ActiveXObject) { try { gml_http = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { gml_http = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { gml_http = false; }   }  }  return gml_http; }

// - // MD5 hash calculator // - // Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. // Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet // Distributed under the BSD License // See http://pajhome.org.uk/crypt/md5 for more info. // - var hexcase = 0; var b64pad = ""; var chrsz  = 8;

function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}

function core_md5(x, len) { 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);

}

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); }

function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }

function bit_rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); }

function str2binl(str) { var bin = Array; var mask = (1 << chrsz) - 1; for(var i = 0; i < str.length * chrsz; i += chrsz) bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); return bin; }

function binl2hex(binarray) { var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for(var i = 0; i < binarray.length * 4; i++) {   str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); } return str; } // - // Add revert buttons to the page // - function AddRevertButtons { var l, article = '', vandal; // Add 'revert' links to a diff page l = document.getElementById('bodyContent').getElementsByTagName('td'); for (i = 0; i < l.length; i++) { if (l[i].className == 'diff-otitle') { article = l[i].getElementsByTagName('a')[0].href.split('&')[0].replace(/[^\/]*\/\/[^\/]*/, ''); } else if (l[i].className == 'diff-ntitle') { var toplink = l[i].getElementsByTagName('a')[0].href; vandalip = l[i].getElementsByTagName('a')[1].href.split(':')[2].split('=')[1]; vandal = l[i].getElementsByTagName('a')[1].href.split(':')[2].split('&')[0]; var t = l[i].innerHTML n = t.indexOf(') ) ' + rollbacklink + '' + rollbacklink + '</str ' + t.substring(n + 5, t.length); }     }    }  } }

// - // Our nice Revert functions // - function PerformRevert { var l, token = '', revert = false; // Look for '&fakeaction=rollback' in URL gml_url = location.pathname; l = location.search.substring(1).split('&'); for (i = 0; i < l.length; i++) { var n = l[i].indexOf('='); var name = l[i].substring(0, n); if (name == 'fakeaction') { if (l[i].substring(n + 1) == 'rollback') revert = true; } else if (name == 'vandal') { gml_vandal = unescape(l[i].substring(n + 1)); } else if (name == 'token') { token = unescape(l[i].substring(n + 1)); } else if (name == 'title') { gml_url += '?' + l[i]; } }  if (!revert) return; document.getElementById('bodyContent').innerHTML = ' Please wait, reverting edits by ' + gml_vandal + '... '; // Avoid XSS kiddies by using a special token if (token == '' || token != hex_md5(gml_url + gml_vandal + document.cookie)) { document.getElementById('bodyContent').innerHTML += ' Error Bad authentication token '; return; }

gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; history_url = gml_url + '&action=history&limit=50'; document.getElementById('bodyContent').innerHTML += ' Getting article history (' + history_url + ')... '; gml_xmlhttp.open("GET", history_url, true); gml_xmlhttp.onreadystatechange = RevertStepTwo; gml_xmlhttp.send(null); }

function RevertStepTwo { if (gml_xmlhttp.readyState != 4) return; var l; var oldid; // Get the vandal and new editor names gml_vandal = gml_vandal.replace(/_/g, ' '); gml_editor = ''; // Hack for a MediaWiki bug xml = gml_xmlhttp.responseText.replace(/<body.*"ns-4">/, '<body class="ns-4">'); doc = gml_XMLParse(xml); if (!doc || !doc.getElementById('pagehistory')) { document.getElementById('bodyContent').innerHTML += ' Failed to parse XML data returned by the server.'; document.getElementById('bodyContent').innerHTML += ' Hint: try to disable both "Enable section editing by right-clicking on section titles (JavaScript)" and "Edit pages on double click (JavaScript)" in your editing preferences until a proper fix is found.'; document.getElementById('bodyContent').innerHTML += ' Dump of the unparseable page : ' + xml.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;'); return; } l = doc.getElementById('pagehistory').getElementsByTagName('li'); //l = doc.selectSingleNode('//*[@id="pagehistory"]').getElementsByTagName('li'); for (i = 0; i < l.length; i++) { var name = l[i].getElementsByTagName('span')[0].getElementsByTagName('a')[0].innerHTML.replace(/_/g, ' '); if (i == 0 && name != gml_vandal) { document.getElementById('bodyContent').innerHTML += ' Error: Last editor is ' + name + ', not ' + gml_vandal + '. The vandal may have already been reverted.'; return; } else if (i > 0 && name != gml_vandal) { oldid = l[i].getElementsByTagName('input')[0].value; gml_editor = name; break; } }  if (gml_editor == '') { document.getElementById('bodyContent').innerHTML += ' Error: ' + gml_vandal + ' is the only editor!'; return; }

gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; document.getElementById('bodyContent').innerHTML += ' Getting article edit form (GET' + gml_url + '&action=edit&oldid=' + oldid + ')... '; gml_xmlhttp.open('GET', gml_url + '&action=edit&oldid=' + oldid, true); gml_xmlhttp.onreadystatechange = RevertStepThree; gml_xmlhttp.send(null); }

function RevertStepThree { if (gml_xmlhttp.readyState != 4) return var form, newform, l; // Insert the downloaded form in our current page, using // only hidden form inputs. doc = gml_XMLParse(gml_xmlhttp.responseText); form = doc.getElementById('editform'); newform = document.createElement('form'); l = form.getElementsByTagName('textarea'); for (i = l.length; i--; ) { var t = document.createElement('input'); t.type = 'hidden'; t.name = l[i].name; t.value = l[i].value; newform.appendChild(t); } l = form.getElementsByTagName('input'); for (i = l.length; i--; ) { if (l[i].name == 'wpSummary') { l[i].value = revertpage.replace(/\$1/g, gml_editor).replace(/\$2/g, gml_vandal); } else if (l[i].name == 'wpMinoredit') { l[i].value = '1'; } else if (l[i].name == 'wpWatchthis') { if (!l[i].checked) continue; // Donâ€™t touch the "watch" status l[i].value = "on"; } else if (l[i].name == 'wpPreview') { continue; } else if (l[i].name == 'wpDiff') { continue; }   l[i].type = 'hidden'; newform.appendChild(l[i]); } newform.name = form.name; newform.method = form.method; newform.id = form.id; newform.action = form.action; document.getElementById('bodyContent').innerHTML += ' Submitting form... '; document.getElementById('bodyContent').appendChild(newform); // Submit the form newform.submit; window.open('http://en.wikipedia.org/w/index.php?title=User talk:' + gml_vandal + '&action=edit',             'targetname',    'location=no,toolbar=no,status=no,directories=no,scrollbars=yes'); } // - // Modify the page once it is loaded // - if (window.addEventListener) { window.addEventListener("load", Revertnorm, false); window.addEventListener("load", AddRevertButtonsnorm, false); window.addEventListener("load", PerformRevert, false); window.addEventListener("load", AddRevertButtons, false); } else if (window.attachEvent) { window.attachEvent("onload", Revertnorm); window.attachEvent("onload", AddRevertButtonsnorm); window.attachEvent("onload", PerformRevert); window.attachEvent("onload", AddRevertButtons); }

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

// //Helper tools if (!addTab) { mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); } //END

//admin list document.write('<script type="text/javascript" src="'             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/adminlist.js'              + '&action=raw&ctype=text/javascript&dontcountme=s"> '); //END //bot list document.write('<script type="text/javascript" src="'             + 'http://en.wikipedia.org/w/index.php?title=User:Voice of All/botlist.js'             + '&action=raw&ctype=text/javascript&dontcountme=s"> '); //END

//History stats $(addhiststats) function addhiststats { var target = document.title.split(" - ")[0]; var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0]; if (location.href.indexOf('&action=history') != -1 && document.title.indexOf('User:') == -1 && document.title.indexOf('User talk:') == -1) {     addTab("javascript:histstats", "Stats", "ca-stats", "History statistics", ""); addTab("http://tools.wikimedia.de/~tim/counter/?page=" + target, "Editors", "ca-editors", "Editor statistics", ""); } if (location.href.indexOf('title=Special:Undelete') != -1 || location.href.indexOf('/Special:Undelete') != -1) {     addTab("javascript:histstats", "Stats", "ca-stats", "History statistics", ""); } } //END function masterview(number) {   var undefined; var c = document.getElementById('contentSub'); var a = c.getElementsByTagName('a'); vandal = a[0].href; if (vandal.split("User:")[1] != undefined) {     vandalb = vandal.split("User:")[1]; if (vandalb.split("&action=edi")[1] != undefined) {         vandalc = vandalb.split("&action=edit")[0]; location.href = 'http://en.wikipedia.org/w/index.php?title=Special:Contributions&target=' + vandalc + '&offset=0&limit=' + number; }         else {         location.href = 'http://en.wikipedia.org/w/index.php?title=Special:Contributions&target=' + vandalb + '&offset=0&limit=' + number; }      }   else if (vandal.split("User_talk:")[1] != undefined) {     vandalb = vandal.split("User_talk:")[1]; if (vandalb.split("&action=edi")[0] != undefined) {         vandalc = vandalb.split("&action=edit")[0]; location.href = 'http://en.wikipedia.org/w/index.php?title=Special:Contributions&target=' + vandalc + '&offset=0&limit=' + number; }         else {         location.href = 'http://en.wikipedia.org/w/index.php?title=Special:Contributions&target=' + vandalb + '&offset=0&limit=' + number; }      } } //END

//edit summary usage % $(addsumperc) function addsumperc { var c1 = document.getElementById('column-one'); var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0]; if (location.href.indexOf(':Contributions') != -1) {     addTab("javascript:sumperentcuse", "edit statistics", "ca-sumuse", "User's edit statistics", ""); addTab("javascript:masterview(1000)", "view last 1000", "ca-stats1", "view last 1000 edits", ""); addTab("javascript:masterview(2000)", "view last 2000", "ca-stats2", "view last 2000 edits", ""); addTab("javascript:masterview(5000)", "view last 5000", "ca-stats5", "view last 5000 edits", ""); if (!window.ActiveXObject) {addTab("javascript:getxmllist", "User rights", "ca-stats6", "Shows user groups", "");} } } //END

//*********************** //standard XML Support function HTTPClient { var gml_http; if(window.XMLHttpRequest) { gml_http = new XMLHttpRequest; } else if (window.ActiveXObject) { try { gml_http = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { gml_http = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { gml_http = false; }   }  }  return gml_http; }

function gml_XMLParse(string) { if (document.implementation.createDocument) { return gml_xmlparser.parseFromString(string, "text/xml"); } else if (window.ActiveXObject) { var gml_xmldoc = new ActiveXObject("Microsoft.XMLDOM"); gml_xmldoc.async = "false"; ret = gml_xmldoc.loadXML(string); if (!ret) return null; return gml_xmldoc.documentElement; } return null; } //END //**********

function getxmllist { alert('Searching for current usergroup information.' + '\n' + 'Please wait...'); gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; var pageurl = '/w/index.php?title=Special:Listusers&group=sysop&limit=5000'; gml_xmlhttp.open("GET", pageurl, true); gml_xmlhttp.onreadystatechange = alertget; gml_xmlhttp.send(null); }

function getusergroup { gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; var pageurl = '/w/index.php?title=Special:Listusers&group=sysop&limit=5000'; gml_xmlhttp.open("GET", pageurl, true); gml_xmlhttp.onreadystatechange = userget; gml_xmlhttp.send(null); }

function alertget { if (gml_xmlhttp.readyState != 4) return; xml = gml_xmlhttp.responseText.replace(/<body.*"ns-4">/, '<body class="ns-4">'); //alert(xml); doc = gml_XMLParse(xml); var l = doc.getElementsByTagName('li'); var user_name = document.getElementById('bodyContent').getElementsByTagName('a')[0].innerHTML; if (user_name.indexOf('FAQ') != -1) {user_name = document.getElementById('bodyContent').getElementsByTagName('a')[1].innerHTML;} alert("Usergroup list obtained. Seaching for " + user_name + "."); //alert(l[0].getElementsByTagName('a')[0].innerHTML); var Jimbo = 'no'; var Larry = 'no'; if (user_name == "Jimbo Wales"){Jimbo = 'yes';} if (user_name == "Larry Sanger"){Larry = 'yes';} var Sysop = ''; var BCrat = ''; var CheckUser = ''; var Steward = ''; var Developer = ''; var Oversight = ''; for (i = 0; i < l.length; i++) {    var name = l[i].getElementsByTagName('a')[0].innerHTML; if (name == user_name) {    if (l[i].innerHTML.indexOf('Bureaucrat<') != -1){BCrat = 'Bureaucrat' + '\n';} if (l[i].innerHTML.indexOf(', checkuser') != -1){CheckUser = 'CheckUser' + '\n';} if (l[i].innerHTML.indexOf(', Steward') != -1){Steward = 'Steward' + '\n';} if (l[i].innerHTML.indexOf('Sysop<') != -1){Sysop = 'Sysop' + '\n';} if (l[i].innerHTML.indexOf('developer,') != -1){Developer = 'Developer' + '\n';} if (l[i].innerHTML.indexOf('oversight,') != -1){Oversight = 'Oversight' + '\n';} }   }    if (Jimbo == 'yes' || Larry == 'yes') {alert("User " + user_name + " belongs to the following user groups:" + "\n" + "-" + "\n" + Sysop + BCrat + CheckUser + Developer + Oversight + Steward + "\n" + "-" + "\n" + "Jimmy Wales and Larry Sanger are the founders of Wikipedia.")} else if (Sysop !=  || BCrat !=  || CheckUser !=  || Steward != ) {alert("User " + user_name + " belongs to the following user groups:" + "\n" + "-" + "\n" + Sysop + BCrat + CheckUser + Developer + Oversight + Steward + "\n" + "-" + "\n")} else if (Sysop ==  && BCrat ==  && CheckUser ==  && Steward == ) {alert("This user is a regular user (does not belong to any user rights groups).")} }

function userget { if (gml_xmlhttp.readyState != 4) return; alert("Usergroup list obtained. Seaching for " + user_name + "."); xml = gml_xmlhttp.responseText.replace(/<body.*"ns-4">/, '<body class="ns-4">'); doc = gml_XMLParse(xml); var l = doc.getElementsByTagName('li'); var user_name = document.getElementById('bodyContent').getElementsByTagName('a')[0].innerHTML; var user_sysop = 'no'; for (i = 0; i < l.length; i++) {    var name = l[i].getElementsByTagName('a')[0].innerHTML; if (user_name == name){user_sysop = 'yes'; break;} }   return user_sysop; }

//Summary percent use function sumperentcuse { var status = ''; if (document.getElementById('bodyContent').innerHTML.split("--Viewing contribution data for")[1] != undefined) {     alert("Results already shown."); return; } alert("Analyzing user's contribution history." + "\n" + "This may take a while if there is a large number of edits shown on this page." + "\n" + "If this fails to generate a report, please make sure that you time preferences are" + "\n" + "set to show dates like '09:12, April 8, 2001'."); var Username = document.getElementById('bodyContent').getElementsByTagName('a')[0].innerHTML; var theusername = 'user ' + Username + ' '; if (Username == 'Talk') {theusername = ' this IP address ';} if (theadminlist.indexOf(Username) != -1) {status = ' (sysop) ';} //tagging edits var rvlink = ' rv '; var nslink = ' no summary '; var mslink = ' minor '; var mamlink = ' minor '; var tplink = ' most recent ' var umplink = ' N.E. ' var alink = ' significant '; var malink = ' significant! '; // var Pagelist = ''; var TE = 0; var sum_edits = 0; var sumart_edits = 0; var Summary_value = -1; var NS = 0; var M = 0; var R = 0; var EX = 0; var UM = 0; var MAM = 0; var Minor_withsum = 0; var Major_withsum = 0; var Major_edit_sum = 0; var Major_article_sum = 0; var Minor_article_sum = 0; var Article_minor_edits = 0; var Article_major_edits = 0; var Is_minor = 0; var Not_minor = 0; var Talk = 0; var User = 0; var Usertalk = 0; var Mediawiki = 0; var Wikipediatalk = 0; var Wikipedia = 0; var Image = 0; var Template = 0; var Category = 0; var Portal = 0; var OTalk = 0; var ArticleE = 0; var ArtSig = 0; var Help = 0; var Unique_pages = 0; var c = document.getElementById('contentSub'); var a = c.getElementsByTagName('a'); l = document.getElementById('bodyContent').getElementsByTagName('li'); //Timing var now = new Date; var timeValue = now.toUTCString.replace(/GMT/, "UTC"); if (timeValue.split('Jan ')[1] != undefined) {var Month = 'Jan'; var Mval = 1; var Day = timeValue.split(' Jan')[0].split(', ')[1]; var Year = timeValue.split('Jan ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Feb ')[1] != undefined) {var Month = 'Feb'; var Mval = 2; var Day = timeValue.split(' Feb')[0].split(', ')[1]; var Year = timeValue.split('Feb ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Mar ')[1] != undefined) {var Month = 'Mar'; var Mval = 3; var Day = timeValue.split(' Mar')[0].split(', ')[1]; var Year = timeValue.split('Mar ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Apr ')[1] != undefined) {var Month = 'Apr'; var Mval = 4; var Day = timeValue.split(' Apr')[0].split(', ')[1]; var Year = timeValue.split('Apr ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('May ')[1] != undefined) {var Month = 'May'; var Mval = 5; var Day = timeValue.split(' May')[0].split(', ')[1]; var Year = timeValue.split('May ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Jun ')[1] != undefined) {var Month = 'Jun'; var Mval = 6; var Day = timeValue.split(' Jun')[0].split(', ')[1]; var Year = timeValue.split('Jun ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('jul ')[1] != undefined) {var Month = 'jul'; var Mval = 7; var Day = timeValue.split(' jul')[0].split(', ')[1]; var Year = timeValue.split('jul ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Aug ')[1] != undefined) {var Month = 'Aug'; var Mval = 8; var Day = timeValue.split(' Aug')[0].split(', ')[1]; var Year = timeValue.split('Aug ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Sep ')[1] != undefined) {var Month = 'Sep '; var Mval = 9; var Day = timeValue.split(' Sep')[0].split(', ')[1]; var Year = timeValue.split('Sep ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Oct ')[1] != undefined) {var Month = 'Oct'; var Mval = 10; var Day = timeValue.split(' Oct')[0].split(', ')[1]; var Year = timeValue.split('Oct ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Nov ')[1] != undefined) {var Month = 'Nov'; var Mval = 11; var Day = timeValue.split(' Nov')[0].split(', ')[1]; var Year = timeValue.split('Nov ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} else if (timeValue.split('Dec ')[1] != undefined) {var Month = 'Dec'; var Mval = 12; var Day = timeValue.split(' Dec')[0].split(', ')[1]; var Year = timeValue.split('Dec ')[1].split(' UTC')[0].split(' ')[0]; var Time = timeValue.substring(17,22);} Simpletime = 1*(Time.split(":")[0]); var TimeM = (Time.split(":")[1]); Time = Simpletime + (TimeM/60); for (i = 0; i < l.length; i++) {         var curi = l[i]; var tpnt = ''; if (i == 0) {         if (l[i].getElementsByTagName('a')[2]) {             tpnt = l[i].getElementsByTagName('a')[2].innerHTML; }         else if (l[i].getElementsByTagName('a')[1]) {             tpnt = l[i].getElementsByTagName('a')[1].innerHTML; }         else if (l[i].getElementsByTagName('a')[0] != undefined) {             tpnt = l[i].getElementsByTagName('a')[0].innerHTML; }          }          else if (i != 0) {             tpnt = l[i].getElementsByTagName('a')[2].innerHTML; }         t = l[i].innerHTML.split(tpnt + '</a> ')[1]; var Revert = 'no'; var Minor = 'no'; var Short = 'no'; var Minor_nonrv = -1; var Minor_or_sum = -1; var Marked_as_minor = 'no'; var Namespace_type = 'non-article'; Summary_value = -1; if (i == 0) {         if (l[i].getElementsByTagName('a')[2]) {              var Namespace = l[i].getElementsByTagName('a')[2].innerHTML; }         else if (l[i].getElementsByTagName('a')[1]) {              var Namespace = l[i].getElementsByTagName('a')[1].innerHTML; }         else if (l[i].getElementsByTagName('a')[0]) {              var Namespace = l[i].getElementsByTagName('a')[0].innerHTML; }          }          else if (i != 0) {         var Namespace = l[i].getElementsByTagName('a')[2].innerHTML; }         if (Pagelist.indexOf(Namespace) == -1){Pagelist += Namespace; Unique_pages = Unique_pages + 1;} if (Namespace.indexOf('Talk:') != -1) {         Namespace_type = 'talk'; Talk = Talk + 1; }         else if (Namespace.indexOf('User:') != -1) {         Namespace_type = 'talk'; User = User + 1; }         else if (Namespace.indexOf('User talk:') != -1) {         Namespace_type = 'talk'; Usertalk = Usertalk + 1; }         else if (Namespace.indexOf('MediaWiki:') != -1) {         Mediawiki = Mediawiki + 1; }         else if (Namespace.indexOf('ipedia talk:') != -1) {         Namespace_type = 'talk'; Wikipediatalk = Wikipediatalk + 1; }         else if (Namespace.indexOf('ipedia:') != -1) {         Wikipedia = Wikipedia + 1; }         else if (Namespace.indexOf('Image:') != -1) {         Image = Image + 1; }         else if (Namespace.indexOf('Template:') != -1) {         Template = Template + 1; }         else if (Namespace.indexOf('Category:') != -1) {         Category = Category + 1; }         else if (Namespace.indexOf('Portal:') != -1) {         Portal = Portal + 1; }         else if (Namespace.indexOf('Help:') != -1) {         Help = Help + 1; }         else if (Namespace.indexOf(' talk:') != -1) {         Namespace_type = 'talk'; OTalk = OTalk + 1; }         else {          Namespace_type = 'article'; }         var klength = curi.getElementsByTagName('span').length; var autoc = 'no'; var the_sum = ''; for (k = 0 ; k < klength; k++) {           if (curi.getElementsByTagName('span')[k].className == 'minor') {                           Minor_nonrv = 1; Minor_or_sum = 1; Minor = 'yes'; Marked_as_minor = 'yes'; }          else if (curi.getElementsByTagName('span')[k].className == 'autocomment') {                   autoc = 'yes'; if (curi.getElementsByTagName('span')[k].innerHTML.split(" -")[1] != undefined) {                      Summary_value = 1; Minor_or_sum = 1; if (curi.getElementsByTagName('span')[k-1].innerHTML.split("- ")[1] != undefined) {               var Careful = 'no'; var the_sum = l[i].getElementsByTagName('span')[k-1].innerHTML.split("- ")[1].split(") ")[0];                 if (curi.getElementsByTagName('span')[k-1].innerHTML.split("- ")[1] != undefined)                {the_sum = l[i].getElementsByTagName('span')[k-1].innerHTML.split("- ")[1].split(" ")[0];}                   t = the_sum;                  break;                      }                    }                  else                      {                       Summary_value = -1;                  if (Minor == 'no')                          {                         Minor_or_sum = -1;                          }                      }                  break;                  }           else if (curi.getElementsByTagName('span')[k].className == 'comment')                   {                            Summary_value = 1;                   Minor_or_sum = 1;                  var Careful = 'no'; var the_sum = l[i].getElementsByTagName('span')[k].innerHTML; t = the_sum; }            } //End of k loop if (Namespace_type == 'article' && the_sum != '') {                if (the_sum.indexOf('reated)') != -1 || the_sum.search('(E|e)xpand') !=-1 || the_sum.search('(w|W)rite new') !=-1 || the_sum.search('(add|more) (history|sections)') !=-1 || the_sum.search('(eate|eated) (stub|article|page|biog|section|paragr)') !=-1 || the_sum.search('(tub|age|rticle) creat') !=-1 || the_sum.search('(N|n)ew (stub|page|article|section|paragr)') !=-1 || the_sum.search('(C|c)reate (page|section|article|biog)') !=-1 || the_sum.search('(C|c)reation of') !=-1 || the_sum.search('add (section|references|sources|citations)') !=-1)                   {Careful = 'yes'; Minor = 'no'; Minor_nonrv = -1;}                 else if (the_sum.search('(I|i)nfo') !=-1 || the_sum.search('(C|c)ontent') !=-1 || the_sum.search('(W|w)rite') !=-1 || the_sum.search('(H|h)istory') !=-1 || the_sum.search('(quotes|fact|xample|xpand|ompromise|nfobox)') !=-1 || the_sum.search('(B|b)iography') !=-1 || the_sum.search('(A|a)rticle') !=-1 || the_sum.search('Creat(e|ion)') !=-1 || the_sum.search('(N|n)ew ') !=-1 || the_sum.search('opyedit') !=-1 || the_sum.search('(D|d)escription') !=-1 || the_sum.search('(D|d)escribe') !=-1 || the_sum.search('(A|a)dd (more )(reference|source|info|content)') !=-1 || the_sum.search('(M|m)ajor ') !=-1) {Careful = 'yes';} else if (autoc == 'no' && the_sum.length < 25){Short = 'yes';} else if (autoc == 'yes' && the_sum.length < 20){Short = 'yes';} else if (the_sum.indexOf('<a href=') == -1 && the_sum.replace(' ',).replace(' ',) == the_sum.replace(' ','')) {Short = 'yes';} } //alert('reg a1'); if (Summary_value == -1) {           NS = NS + 1; l[i].innerHTML += ' (' + nslink + ') #' + NS; }         if (Minor_or_sum == 1) {           EX = EX + 1; }         if (Minor_or_sum == -1) {           UM = UM + 1; l[i].innerHTML += ' (' + umplink + ') #' + UM; }         if (l[i].innerHTML.indexOf('(top)') != -1) {         TE = TE + 1; }     if (Summary_value == 1 && t.match('rotect(ed| )') == null) {       if (t.search('(RV|Rv|rV)v') !=-1 || t.search('(R|r)m ') !=-1 || t.search('(R|r)ever(t|ted|ting) ') !=-1 || t.search('(R|r)eversion') !=-1 || t.indexOf('raffitti)') !=-1 || t.search('- rv') !=-1 || t.indexOf('(rv') !=-1 || t.indexOf('(revert') !=-1 || t.search('Rv') !=-1 || t.indexOf('(RV') !=-1 || t.search('( nonsense|vandal ed|ollback )') !=-1 || t.indexOf('(Revert') !=-1 || t.search('(t|ed|e) vandal') !=-1 || t.search('(R|r)(V|v) ') !=-1 || t.search('(L|l)inkspam') !=-1 || t.search('(R|r)emov(ed|ing)') !=-1 || t.search('(R|r)m ') !=-1 || t.search('(R|r)emove') !=-1 || t.search('elet(ed|ing) ') !=-1 || t.search('einsta(t|ted)') !=-1 || t.search('(R|r)mv') !=-1 || t.search(' vanda(l|lism)') !=-1 || t.search('(R|r)estore(d) ') !=-1 || t.search('(un|n)ecessary ') !=-1)            {          Minor_nonrv = -1;          Revert = 'yes';          R = R + 1;          l[i].innerHTML += ' (' + rvlink + ') #' + R;            } } //alert('reg 3r'); if (Namespace_type == 'article' && Summary_value == 1 && Revert == 'no' && Minor == 'no' && Short == 'no' && Careful == 'no') {       if (t.search('(\\+|-|>|\\#|!)') !=-1 || t.search('(\\(no |\\(clean|\\(Clean|grammer|Grammer)') != -1 || t.search('(S|s)pelling') !=-1 || t.search('(al|ing) error') !=-1 || t.search('(W|w)ikif(y|ied)') !=-1 || t.search('ategor(y|ize)') !=-1 || t.search('(F|f)ix') !=-1 || t.search('(T|t)ypo') !=-1 || t.indexOf('{{') !=-1 || t.indexOf('[[') !=-1 || t.indexOf('(stub)') !=-1 || t.search('(M|m)ov(e|ing) ') !=-1 || t.match('( -|--)') !=-1 || t.search('(F|f|fo)rm(t|at)') !=-1 || t.search('(L|l)ink ') !=-1 || t.search('(S|s)tyle') !=-1 || t.search('( abbr|Abbr|Disambig|disambig|Dab\\.|dab\\.)') !=-1 || t.search('(M|m)odif(y|ied)') !=-1 || t.search('r(e|e-)order') !=-1 || t.search('(eword |ording | word| tag|place |bad |can |doesn)') !=-1 || t.search('(R|r)e(structure|organiz|order)') !=-1 || t.search('(L|l)ist') !=-1 || t.search('(C|c)lea(n|r)') !=-1 || t.search('(C|c)larity') !=-1 || t.search('(O|o)(O|o)ps') !=-1 || t.search('" to ') !=-1 || t.search('edir(ect|ing)') !=-1 || t.search('(M|m)ov(ed|ing) ') !=-1 || t.search('(A|a)(F|f)(D|d)') !=-1 || t.search('for (D|d)ele') !=-1 || t.search('(AWB|REDIR)') !=-1 || t.search('(N|n)eed(ed| )') !=-1 || t.search('(C|c)orrect') !=-1 || t.search('ub(cat|section)') !=-1 || t.search(' (not|NOT) ') !=-1 || t.search(' (is|IS) (not|NOT)') !=-1 || t.search('only') !=-1 || t.search('(P|p)lease ') !=-1 || t.search('(CSD|CfSD|belong|eorganize|ointless|clarif|onvert | name)') !=-1 || t.search('cat') !=-1 || t.search('(V|v)ersion') !=-1 || t.indexOf('" ') !=-1 || t.indexOf(' "') !=-1 || t.search('(E|e)asier') !=-1 || t.search('(S|s)impl') !=-1 || t.search('(S|s)mall') !=-1 || t.search('(S|s)horten') !=-1 || t.search(' (heading|title)') !=-1 || t.search('(avoid|merge |merge\\)|epair|few |small |minor |rotected|opulating)') !=-1 || t.indexOf("' ") !=-1 || t.indexOf(" '") !=-1 || t.search('(onvert|rid|Auto) ') !=-1 || t.search('(T|t)his ') !=-1 || t.search('(is|auto) ') !=-1 || t.search(" conver(t|sion)") !=-1)               {          Minor_nonrv = 1;          Minor = 'yes';               }           } //alert('reg 4r');  else if (Namespace_type != 'talk' && Namespace_type != 'article' && Summary_value == 1 && Revert == 'no' && Minor == 'no')           {        if (t.search('(minor\\)|\\(m\\)| m\\)|sp\\)|gr\\)|\\#)') !=-1 || t.search('(grammar|spelling|Fix|fix|typo|al error|g errors|sign |minor )')!=-1 || t.indexOf('(+') !=-1|| t.indexOf('sig.') !=-1 || t.indexOf('(-') !=-1 || t.indexOf('ikify)') !=-1 || t.indexOf('(clean') !=-1 || t.indexOf('(Protect') !=-1 || t.indexOf('(Unprotect') !=-1 || t.search('(opulating |move |format | word|frmt|style|tag)') !=-1 || t.indexOf('{{') !=-1 || t.indexOf('>') !=-1 || t.search('style') !=-1 || t.indexOf('dab.') !=-1 || t.search('(clear|larity|clarif|clean|eword |ording | word)') !=-1 || t.search('estructure') !=-1 || t.search('(O|o)(O|o)ps') !=-1 || t.indexOf('" to ') !=-1 || t.search('epair') !=-1 || t.indexOf('(move') !=-1 || t.indexOf('(Move') !=-1 || t.search('ub(cat|section)') !=-1 || t.search('(S|s)horten') !=-1 || t.search(' heading') !=-1 || t.search('small (e|c|a)') !=-1)              {          Minor_nonrv = 1;          Minor = 'yes';               }           }          if (Namespace_type == 'article')           {          ArticleE = ArticleE + 1;          if (Minor_or_sum == -1){Minor = 'no'}          if (Short == 'yes' && Revert == 'no' && Minor == 'no')               {               Minor = 'yes';               Minor_nonrv = 1;               } //article edit summary use percent stuff          if (Marked_as_minor == 'no' && i<1000)               {          sumart_edits += 1;          Article_major_edits = Article_major_edits + 1;           if (Summary_value == 1){Major_article_sum = Major_article_sum + 1;}               }          else if (Marked_as_minor == 'yes' && i<1000)               {          sumart_edits += 1;          Article_minor_edits = Article_minor_edits + 1;           if (Summary_value == 1){Minor_article_sum = Minor_article_sum + 1;}               } //sig. article edits          if (Minor == 'no' && Revert == 'no' && Summary_value == 1 && Marked_as_minor == 'no')               {          ArtSig = ArtSig + 1;          l[i].innerHTML += ' (' + alink + ') #' + ArtSig;                 }          else if (Minor == 'no' && Revert == 'no' && Summary_value == 1 && Marked_as_minor == 'yes')               {          ArtSig = ArtSig + 1;          l[i].innerHTML += ' (' + malink + ') #' + ArtSig;                 }             } //overall for edit percent usage (up 1000 only)          if (Marked_as_minor == 'yes' && i<1000)            {            sum_edits += 1;            Is_minor = Is_minor + 1;            if (Summary_value == 1)            {Minor_withsum = Minor_withsum + 1;}                }          else if (Marked_as_minor == 'no' && i<1000)            {            sum_edits += 1;            Not_minor = Not_minor + 1;            if (Summary_value == 1)            {Major_withsum = Major_withsum + 1;}                } //done          if (Minor_nonrv == 1)            {            M = M + 1;          if (Marked_as_minor == 'yes')          {l[i].innerHTML += ' (' + mslink + ') #' + M;}          else if (Marked_as_minor == 'no')           {l[i].innerHTML += ' (' + mamlink + ') #' + M; MAM = MAM + 1; }             }      } //END of FOR loop j=i-1; var yearloc = l[j].innerHTML.split('action=history')[0]; if (yearloc.indexOf('January ') != -1) {var LMonth = 'January'; var LMval = 1; var LDay = yearloc.split('January ')[1].split(',')[0]; var LYear = yearloc.split('January ')[1].split(', ')[1]; var LTime = yearloc.split(', January ')[0];} else if (yearloc.indexOf('February ') != -1) {var LMonth = 'February'; var LMval = 2; var LDay = yearloc.split('February ')[1].split(',')[0]; var LYear = yearloc.split('February ')[1].split(', ')[1]; var LTime = yearloc.split(', February ')[0];} else if (yearloc.indexOf('March ') != -1) {var LMonth = 'March'; var LMval = 3; var LDay = yearloc.split('March ')[1].split(',')[0]; var LYear = yearloc.split('March ')[1].split(', ')[1]; var LTime = yearloc.split(', March ')[0];} else if (yearloc.indexOf('April ') != -1) {var LMonth = 'April'; var LMval = 4; var LDay = yearloc.split('April ')[1].split(',')[0]; var LYear = yearloc.split('April ')[1].split(', ')[1]; var LTime = yearloc.split(', April ')[0];} else if (yearloc.indexOf('May ') != -1) {var LMonth = 'May'; var LMval = 5; var LDay = yearloc.split('May ')[1].split(',')[0]; var LYear = yearloc.split('May ')[1].split(', ')[1]; var LTime = yearloc.split(', May ')[0];} else if (yearloc.indexOf('June ') != -1) {var LMonth = 'June'; var LMval = 6; var LDay = yearloc.split('June ')[1].split(',')[0]; var LYear = yearloc.split('June ')[1].split(', ')[1]; var LTime = yearloc.split(', June ')[0];} else if (yearloc.indexOf('July ') != -1) {var LMonth = 'July'; var LMval = 7; var LDay = yearloc.split('July ')[1].split(',')[0]; var LYear = yearloc.split('July ')[1].split(', ')[1]; var LTime = yearloc.split(', July ')[0];} else if (yearloc.indexOf('August ') != -1) {var LMonth = 'August'; var LMval = 8; var LDay = yearloc.split('August ')[1].split(',')[0]; var LYear = yearloc.split('August ')[1].split(', ')[1]; var LTime = yearloc.split(', August ')[0];} else if (yearloc.indexOf('September ') != -1) {var LMonth = 'September'; var LMval = 9; var LDay = yearloc.split('September ')[1].split(',')[0]; var LYear = yearloc.split('September ')[1].split(', ')[1]; var LTime = yearloc.split(', September ')[0];} else if (yearloc.indexOf('October ') != -1) {var LMonth = 'October'; var LMval = 10; var LDay = yearloc.split('October ')[1].split(',')[0]; var LYear = yearloc.split('October ')[1].split(', ')[1]; var LTime = yearloc.split(', October ')[0];} else if (yearloc.indexOf('November ') != -1) {var LMonth = 'November'; var LMval = 11; var LDay = yearloc.split('November ')[1].split(',')[0]; var LYear = yearloc.split('November ')[1].split(', ')[1]; var LTime = yearloc.split(', November ')[0];} else if (yearloc.indexOf('December ') != -1) {var LMonth = 'December'; var LMval = 12; var LDay = yearloc.split('December ')[1].split(',')[0]; var LYear = yearloc.split('December ')[1].split(', ')[1]; var LTime = yearloc.split(', December ')[0];} var lpoint = LTime.length - 5; LTimenum = LTime.substring(lpoint); LSimpletime = 1*(LTimenum.split(":")[0]); var LTimeM = (LTimenum.split(":")[1]); LTime = LSimpletime + (LTimeM/60); var E = i; LYear = LYear.split(' ')[0].split('</a>')[0]; var mothr = Day - 1 + (Time/24); var mothl = 30.42 - (LDay - 1 + LTime/24); if (Year == LYear)  {  var mdiff = 30.42*(Mval - LMval - 1);  var totdays = mothr + mothl + mdiff;  if (Mval == LMval)  {totdays = Day - 1 + Time/24 - (LDay - 1 + LTime/24);}  var average = E/totdays;  var rvaverage = R/totdays;  var nonrvave = average - rvaverage;  var Daylength = Math.round((1)*totdays)/1;  if (Daylength == 0)    {  Daylength = 1;    }  } else if (Year != LYear)  {  var ydiff = 365*(Year - LYear - 1);  var yearr = 30.42*(Mval - 1) + mothr;  var yearl = 30.42*(12 - LMval - 1) + mothl;  var totdays = yearr + ydiff + yearl;  var average = E/totdays;  var rvaverage = R/totdays;  var nonrvave = average - rvaverage;  var Daylength = Math.round((1)*totdays)/1;  if (Daylength == 0)    {  Daylength = 1;    }  } ave_tot = i; //Check up to 500 edits, may redefine average edits/day if (E>500) { yearloc = l[499].innerHTML.split('action=history')[0]; //alert(yearloc); if (yearloc.indexOf('January ') != -1) {var ECMonth = 'January'; var ECMval = 1; var ECDay = yearloc.split('January ')[1].split(',')[0]; var ECYear = yearloc.split('January ')[1].split(', ')[1]; var ECTime = yearloc.split(', January ')[0];} else if (yearloc.indexOf('February ') != -1) {var ECMonth = 'February'; var ECMval = 2; var ECDay = yearloc.split('February ')[1].split(',')[0]; var ECYear = yearloc.split('February ')[1].split(', ')[1]; var ECTime = yearloc.split(', February ')[0];} else if (yearloc.indexOf('March ') != -1) {var ECMonth = 'March'; var ECMval = 3; var ECDay = yearloc.split('March ')[1].split(',')[0]; var ECYear = yearloc.split('March ')[1].split(', ')[1]; var ECTime = yearloc.split(', March ')[0];} else if (yearloc.indexOf('April ') != -1) {var ECMonth = 'April'; var ECMval = 4; var ECDay = yearloc.split('April ')[1].split(',')[0]; var ECYear = yearloc.split('April ')[1].split(', ')[1]; var ECTime = yearloc.split(', April ')[0];} else if (yearloc.indexOf('May ') != -1) {var ECMonth = 'May'; var ECMval = 5; var ECDay = yearloc.split('May ')[1].split(',')[0]; var ECYear = yearloc.split('May ')[1].split(', ')[1]; var ECTime = yearloc.split(', May ')[0];} else if (yearloc.indexOf('June ') != -1) {var ECMonth = 'June'; var ECMval = 6; var ECDay = yearloc.split('June ')[1].split(',')[0]; var ECYear = yearloc.split('June ')[1].split(', ')[1]; var ECTime = yearloc.split(', June ')[0];} else if (yearloc.indexOf('July ') != -1) {var ECMonth = 'July'; var ECMval = 7; var ECDay = yearloc.split('July ')[1].split(',')[0]; var ECYear = yearloc.split('July ')[1].split(', ')[1]; var ECTime = yearloc.split(', July ')[0];} else if (yearloc.indexOf('August ') != -1) {var ECMonth = 'August'; var ECMval = 8; var ECDay = yearloc.split('August ')[1].split(',')[0]; var ECYear = yearloc.split('August ')[1].split(', ')[1]; var ECTime = yearloc.split(', August ')[0];} else if (yearloc.indexOf('September ') != -1) {var ECMonth = 'September'; var ECMval = 9; var ECDay = yearloc.split('September ')[1].split(',')[0]; var ECYear = yearloc.split('September ')[1].split(', ')[1]; var ECTime = yearloc.split(', September ')[0];} else if (yearloc.indexOf('October ') != -1) {var ECMonth = 'October'; var ECMval = 10; var ECDay = yearloc.split('October ')[1].split(',')[0]; var ECYear = yearloc.split('October ')[1].split(', ')[1]; var ECTime = yearloc.split(', October ')[0];} else if (yearloc.indexOf('November ') != -1) {var ECMonth = 'November'; var ECMval = 11; var ECDay = yearloc.split('November ')[1].split(',')[0]; var ECYear = yearloc.split('November ')[1].split(', ')[1]; var ECTime = yearloc.split(', November ')[0];} else if (yearloc.indexOf('December ') != -1) {var ECMonth = 'December'; var ECMval = 12; var ECDay = yearloc.split('December ')[1].split(',')[0]; var ECYear = yearloc.split('December ')[1].split(', ')[1]; var ECTime = yearloc.split(', December ')[0];} var lpoint = ECTime.length - 5; ECTimenum = ECTime.substring(lpoint); ECSimpletime = 1*(ECTimenum.split(":")[0]); var ECTimeM = ECTimenum.split(":")[1]; ECTime = ECSimpletime + (ECTimeM/60); ECYear = ECYear.split(' ')[0].split('</a>')[0]; var mothEC = 30.42 - (ECDay - 1 + ECTime/24); //alert(ECTime + '|' + ECYear + '|' + mothEC); if (Year == ECYear)  {  var ECmdiff = 30.42*(Mval - ECMval - 1);  var ECtotdays = mothr + mothEC + ECmdiff;  if (Mval == ECMval)  {ECtotdays = Day - 1 + Time/24 - (ECDay - 1 + ECTime/24);}  average = 500/ECtotdays;  } else if (Year != ECYear)  {  var ECydiff = 365*(Year - ECYear - 1);  var yearEC = 30.42*(12 - ECMval - 1) + mothEC;  var ECtotdays = yearr + ECydiff + yearEC;  average = 500/ECtotdays;  } ave_tot = 500; } // average = Math.round((100)*average)/100; var avenotice = ''; //wow..statistics people var caverage = Math.round((1000)*caverage)/1000; if (location.href.split("&offset=")[1] != undefined) {  if (location.href.split("&offset=0")[1] != undefined)   {   var offset = 'no';   }  else   {  average = ' [Value unknown]* ';  avenotice = ' *Average edits per day not shown because the most recent edit to this page is not visable ';   var offset = 'yes';   } } var U_edits = E-EX; var S_edits = EX-M-R; var FAQ = '<a href="http://en.wikipedia.org/wiki/User:Voice_of_All/History_analysis_JS_Definitions_and_FAQ" title="HistoryFAQ"> (FAQ) </a>'; oldbody = document.getElementById('bodyContent').innerHTML; document.getElementById('bodyContent').innerHTML = ' --Viewing contribution data for ' + theusername + status + ' (over the ' + i + ' edit(s) shown on this page)-- ' + FAQ + ' ' + ' Time range: ' + Daylength + ' approximate day(s) of edits on this page  ' + 'Most recent edit on: ' + Simpletime + 'hr (UTC) -- ' + Day + ', ' + Month + ', ' + Year + ' ' + 'Oldest edit on: ' + LSimpletime + 'hr (UTC) -- ' + LDay + ', ' + LMonth + ', ' + LYear + ' ' + ' Overall edit summary use (last ' + sum_edits + ' edits): ' + ' Major edits: ' + Math.round((100)*(100*(Major_withsum/Not_minor)))/100 + ' % ' + ' Minor edits: ' + Math.round((100)*(100*(Minor_withsum/Is_minor)))/100 + ' % ' + ' Article edit summary use (last ' + sumart_edits + ' edits) : ' + ' Major article edits: ' + Math.round((100)*(100*(Major_article_sum/Article_major_edits)))/100 + ' % ' + ' Minor article edits: ' + Math.round((100)*(100*(Minor_article_sum/Article_minor_edits)))/100 + ' % ' + ' Average edits per day: ' + average + ' (for last ' + ave_tot + ' edit(s)) ' + 'Marked notable article edits (creation/expansion/rewrites/sourcing): ' + Math.round((100)*(100*(ArtSig)/E))/100 + ' % (' + ArtSig + ') ' + ' Unique pages edited: ' + Unique_pages + ' | ' + 'Average edits per page: ' + Math.round(100*E/Unique_pages)/100 + ' | ' + 'Edits on top: ' + Math.round((100)*(100*(TE)/E))/100 + ' % ' + ' Breakdown of all edits:  ' + ' Significant edits (non-minor/reverts): ' + Math.round((100)*(100*(EX-M-R)/E))/100 + ' % (' + S_edits + ' edit(s)) ' + ' Minor edits (non-reverts): ' + Math.round((100)*(100*(M)/E))/100 + ' % (' + M + ' edit(s)) ' + ' Marked reverts: ' + Math.round((100)*(100*(R)/E))/100 + ' % (' + R + ' edit(s)) ' + ' Unmarked edits: ' + Math.round((100)*(100*(E-EX)/E))/100 + ' % (' + U_edits + ' edit(s)) ' + ' Edits by Wikipedia namespace:  ' + 'Article: ' + Math.round((100)*(100*(ArticleE)/E))/100 + ' % (' + ArticleE + ') | Article talk: ' + Math.round((100)*(100*(Talk)/E))/100 + ' % (' + Talk + ') ' + ' User: ' + Math.round((100)*(100*(User)/E))/100 + ' % (' + User + ') | User talk: ' + Math.round((100)*(100*(Usertalk)/E))/100 + ' % (' + Usertalk + ') ' + ' Wikipedia: ' + Math.round((100)*(100*(Wikipedia)/E))/100 + ' % (' + Wikipedia + ') | Wikipedia talk: ' + Math.round((100)*(100*(Wikipediatalk)/E))/100 + ' % (' + Wikipediatalk + ') ' + ' Image: ' + Math.round((100)*(100*(Image)/E))/100 + ' % (' + Image + ') ' + ' Template: ' + Math.round((100)*(100*(Template)/E))/100 + ' % (' + Template + ') ' + ' Category: ' + Math.round((100)*(100*(Category)/E))/100 + ' % (' + Category + ') ' + ' Portal: ' + Math.round((100)*(100*(Portal)/E))/100 + ' % (' + Portal + ') ' + ' Help: ' + Math.round((100)*(100*(Help)/E))/100 + ' % (' + Help + ') ' + ' MediaWiki: ' + Math.round((100)*(100*(Mediawiki)/E))/100 + ' % (' + Mediawiki + ') ' + ' Other talk pages: ' + Math.round((100)*(100*(OTalk)/E))/100 + ' % (' + OTalk + ') ' + avenotice + oldbody; return; } //END //Vandal and IP stats function histstats {    alert("Analyzing this page's edit history." + "\n" + "This may take a while if there is a large number of edits shown on this page." + "\n" + "If this fails to generate a report, please make sure that you time preferences are" + "\n" + "set to show dates like '09:12, April 8, 2001'.");  if (document.getElementById('bodyContent').innerHTML.split("Viewing article modification statistics (from the")[1] != undefined || document.getElementById('bodyContent').innerHTML.split("There are no article modification statistics to show since there is only one edit.")[1] != undefined)      {      alert("Results already shown.");      return;      }  var firstbody = document.getElementById('bodyContent').innerHTML;  var botlink = ' bot ';  var syslink = ' sysop ';  var rvlink = ' rv ';  var nulink = ' blank userpage ';  var iplink = ' IP edit ';  var vanlink = ' likely vandal rv ';  var nslink = ' no summary ';  var oldloc = location.href;  var R = 0;  var V = 0;  var IP = 0;  var NU = 0;  var NS = 0;  var SYS = 0;  var BOT = 0;  var undelete = 'no';  var username = '';  var c = document.getElementById('contentSub');  var a = c.getElementsByTagName('a');  l = document.getElementById('bodyContent').getElementsByTagName('li');  if (location.href.indexOf('http://en.wikipedia.org/wiki/Special:Undelete/') != -1)    {    undelete = 'yes';    var suslink = ' suspicious ';    l = document.getElementById('bodyContent').getElementsByTagName('ul')[1].getElementsByTagName('li');    nulink = ' blank userpage ';    iplink = ' IP edit ';     } var now = new Date; var timeValue = now.toUTCString.replace(/GMT/, "UTC"); if (timeValue.split('Jan ')[1] != undefined) {var CMonth = 'Jan'; var CMval = 1; var CDay = timeValue.split(' Jan')[0].split(', ')[1]; var CYear = timeValue.split('Jan ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Feb ')[1] != undefined) {var CMonth = 'Feb'; var CMval = 2; var CDay = timeValue.split(' Feb')[0].split(', ')[1]; var CYear = timeValue.split('Feb ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Mar ')[1] != undefined) {var CMonth = 'Mar'; var CMval = 3; var CDay = timeValue.split(' Mar')[0].split(', ')[1]; var CYear = timeValue.split('Mar ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Apr ')[1] != undefined) {var CMonth = 'Apr'; var CMval = 4; var CDay = timeValue.split(' Apr')[0].split(', ')[1]; var CYear = timeValue.split('Apr ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('May ')[1] != undefined) {var CMonth = 'May'; var CMval = 5; var CDay = timeValue.split(' May')[0].split(', ')[1]; var CYear = timeValue.split('May ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Jun ')[1] != undefined) {var CMonth = 'Jun'; var CMval = 6; var CDay = timeValue.split(' Jun')[0].split(', ')[1]; var CYear = timeValue.split('Jun ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('jul ')[1] != undefined) {var CMonth = 'jul'; var CMval = 7; var CDay = timeValue.split(' jul')[0].split(', ')[1]; var CYear = timeValue.split('jul ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Aug ')[1] != undefined) {var CMonth = 'Aug'; var CMval = 8; var CDay = timeValue.split(' Aug')[0].split(', ')[1]; var CYear = timeValue.split('Aug ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Sep ')[1] != undefined) {var CMonth = 'Sep '; var CMval = 9; var CDay = timeValue.split(' Sep')[0].split(', ')[1]; var CYear = timeValue.split('Sep ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Oct ')[1] != undefined) {var CMonth = 'Oct'; var CMval = 10; var CDay = timeValue.split(' Oct')[0].split(', ')[1]; var CYear = timeValue.split('Oct ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Nov ')[1] != undefined) {var CMonth = 'Nov'; var CMval = 11; var CDay = timeValue.split(' Nov')[0].split(', ')[1]; var CYear = timeValue.split('Nov ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} else if (timeValue.split('Dec ')[1] != undefined) {var CMonth = 'Dec'; var CMval = 12; var CDay = timeValue.split(' Dec')[0].split(', ')[1]; var CYear = timeValue.split('Dec ')[1].split(' UTC')[0].split(' ')[0]; var CTime = timeValue.substring(17,22);} CSimpletime = 1*(CTime.split(":")[0]); var CTimeM = (CTime.split(":")[1]); CTime = CSimpletime + (CTimeM/60);  for (i = 0; i < l.length; i++)       {      var sysop = 'no';      var Summary_value = -1;      if (l[i] != undefined)         {           t = l[i].innerHTML;            if (i == 0)              {                 if (l[i].getElementsByTagName('a')[2] != undefined)                 {                 username = l[i].getElementsByTagName('a')[2].innerHTML;                 }              }             else if (l[i].getElementsByTagName('a')[3] != undefined)              {              username = l[i].getElementsByTagName('a')[3].innerHTML;              }              if (location.href.indexOf('http://en.wikipedia.org/wiki/Special:Undelete/') != -1)              {              username = l[i].getElementsByTagName('a')[1].innerHTML;              }          for (k = 0 ; k < 3; k++)            {          if (l[i].getElementsByTagName('span')[k] != undefined)               {           if (l[i].getElementsByTagName('span')[k].className == 'minor')                   {                            Summary_value = -1;                   }           else if (l[i].getElementsByTagName('span')[k].className == 'autocomment')                   {                           if (l[i].getElementsByTagName('span')[k].innerHTML.split(" -")[1] != undefined)                       {                       Summary_value = 1;                       }                 else                      {                       Summary_value = -1;                       }                  }           else if (l[i].getElementsByTagName('span')[k].className == 'comment')                   {                            Summary_value = 1;                   }               }            }             if (Summary_value == -1)              {                NS = NS + 1;              l[i].innerHTML += ' (' + nslink + ') #' + NS;                       }             if (theadminlist.indexOf('.' + username + '|') != -1)              {                SYS = SYS + 1;              sysop = 'yes';              l[i].innerHTML += ' (' + syslink + ') #' + SYS;                       }             if (thervbotlist.indexOf(username + '|') != -1)              {                BOT = BOT + 1;              l[i].innerHTML += ' (' + botlink + ') #' + BOT;                       }        if (t.indexOf('(rvv') != -1 || t.indexOf('(Rvv') != -1 || t.indexOf('(RVV') != -1 ||t.indexOf('(RvV') != -1 ||  t.indexOf('rm vandalism') != -1 || t.indexOf('(RV V') != -1 || t.indexOf('(Reverted edits') != -1 || t.indexOf('(Popups assisted reversion') != -1 || t.indexOf('(Revert to revision') != -1 || t.indexOf('rmv graffitti') != -1 || t.indexOf('rm graffitti') != -1 || t.indexOf('rv graffitti') != -1 || t.indexOf('BOT - rv') != -1 || t.indexOf('(reverted vandalism') != -1 || t.indexOf('(Reverted vandalism') != -1 || t.indexOf('BOT - Reverted') != -1 || t.indexOf('(RVV') != -1 || t.indexOf('rm nonsense') != -1 || t.indexOf('rm nonsense') != -1 || t.indexOf('remove nonsense') != -1 || t.indexOf('to last version by') != -1 || t.indexOf('(rm test') != -1 || t.indexOf('vandal edit') != -1 || t.indexOf('remove vandalism') != -1 || t.indexOf('removed vandalism') != -1 || t.indexOf('not compromise the integrity') != -1 || t.indexOf('(fixed vandalism') != -1 || t.indexOf('(Revert vandal') != -1 || t.indexOf('(revert vandal') != -1 || t.indexOf('delete vandalism') != -1 || t.indexOf('Delete vandalism') != -1 || t.indexOf('deleted vandalism') != -1 || t.indexOf('Deleted vandalism') != -1 || t.indexOf('Deleted vandalism') != -1 || t.indexOf('rev vandal') != -1 || t.indexOf('Rev vandal') != -1 || t.indexOf('rv vandalism') != -1 || t.indexOf('Rv vandalism') != -1 || t.indexOf('Reverting vandal') != -1 || t.indexOf('reverting vandal') != -1 || t.indexOf('(rv/v') != -1 || t.indexOf('inkspam') != -1 || t.indexOf('restore ') != -1)            {          V = V + 1;          l[i].innerHTML += ' (' + vanlink + ') #' + V;          R = R + 1;          l[i].innerHTML += ' (' + rvlink + ') #' + R;            }        else if (t.indexOf('(Reverted ') != -1 || t.indexOf('(rv') != -1 || t.indexOf('(revert') != -1 || t.indexOf('(Revert') != -1 || t.indexOf('Revert ') != -1 || t.indexOf('revert ') != -1 || t.indexOf('(rv') != -1 || t.indexOf('(Rv') != -1 || t.indexOf('(RV') != -1 || t.indexOf('rv.') != -1 || t.indexOf('( rv') != -1 || t.indexOf('Reverting ') != -1 || t.indexOf('(Restoring ') != -1 || t.indexOf('restore ') != -1 || t.indexOf('(restoring ') != -1 || t.indexOf('(Removed') != -1 || t.indexOf('removed ') != -1 || t.indexOf('Rm ') != -1 || t.indexOf('(rm ') != -1 || t.indexOf('einstated ') != -1 || t.indexOf('rmv') != -1 || t.indexOf('einstate ') != -1 || t.indexOf('delete ') != -1 || t.indexOf('deleted ') != -1 || t.indexOf('emoved ') != -1 || t.indexOf('rm ') != -1 || t.indexOf('emove ') != -1 || t.indexOf('eleted ') != -1 || t.indexOf('einstated') != -1 || t.indexOf('einstate ') != -1 || t.indexOf('rmv') != -1 || t.indexOf('restored ') != -1 || t.indexOf('ollback ') != -1 || t.indexOf('andalism ') != -1 || t.indexOf(' vandal') != -1 || t.indexOf('Restore ') != -1 || t.indexOf('Restored ') != -1 || t.indexOf('ecessary ') != -1 || t.indexOf('unnecess') != -1)            {          R = R + 1;          l[i].innerHTML += ' (' + rvlink + ') #' + R;            }        if (undelete == 'yes' && sysop == 'no')         {        if (t.indexOf('(umber') != -1 || t.indexOf('home') != -1 || t.indexOf('(ddress') != -1 || t.indexOf('reet') != -1 || t.indexOf('ives ') != -1 || t.indexOf('-1') != -1 || t.indexOf('-2') != -1 || t.indexOf('-3') != -1 || t.indexOf('-4') != -1 || t.indexOf('-5') != -1 || t.indexOf('-6') != -1 || t.indexOf('-7') != -1 || t.indexOf('-8') != -1 || t.indexOf('-9') != -1 || t.indexOf('-0') != -1 || t.indexOf('!') != -1 || t.indexOf('___') != -1 || t.indexOf('ersonal') != -1 || t.indexOf('I ') != -1 || t.indexOf('You') != -1 || t.indexOf('YOU') != -1 || t.indexOf('YOu') != -1 || t.indexOf('YoU') != -1 || t.indexOf('He') != -1 || t.indexOf('HE') != -1 || t.indexOf('he ') != -1 || t.indexOf('WoW') != -1 || t.indexOf('WILLY') != -1 || t.indexOf('Willy') != -1  || t.indexOf('uck') != -1 || t.indexOf('UCK') != -1 || t.indexOf('enis') != -1 || t.indexOf('PEN') != -1 || t.indexOf('ock') != -1 || t.indexOf('OCK') != -1 || t.indexOf('LOL') != -1)            {          l[i].innerHTML += ' (' + suslink + ')';            }          }        if (l[i].getElementsByTagName('a')[3] != undefined)         {               if (l[i].getElementsByTagName('a')[3].href.indexOf('title=Special:Contributions') != -1)                {                IP = IP + 1;                 l[i].innerHTML += ' (' + iplink + ') #' + IP;                }            if (l[i].getElementsByTagName('a')[3].href.indexOf('&action=edit') != -1 && sysop == 'no')            {            NU = NU + 1;            l[i].innerHTML += ' (' + nulink + ') #' + NU;            }         }        else if (l[i].getElementsByTagName('a')[2] != undefined)          {          if (l[i].getElementsByTagName('a')[2].href.indexOf('title=Special:Contributions') != -1)            {            IP = IP + 1;            l[i].innerHTML += ' (' + iplink + ') #' + IP;            }          if (l[i].getElementsByTagName('a')[2].href.indexOf('&action=edit') != -1 && sysop == 'no')            {            NU = NU + 1;            l[i].innerHTML += ' (' + nulink + ') #' + NU;            }           }        else if (l[i].getElementsByTagName('a')[1] != undefined)          {          if (l[i].getElementsByTagName('a')[1].href.indexOf('title=Special:Contributions') != -1)            {            IP = IP + 1;            l[i].innerHTML += ' (' + iplink + ') #' + IP;            }          if (l[i].getElementsByTagName('a')[1].href.indexOf('&action=edit') != -1 && sysop == 'no')            {            NU = NU + 1;            l[i].innerHTML += ' (' + nulink + ') #' + NU;            }           }          }      else          {       break;          }       } var oldbody = document.getElementById('bodyContent').innerHTML; if (document.title.indexOf('View and restore deleted pages') != -1) {var lt = l[0].getElementsByTagName('a')[0].innerHTML;} else if (location.href.indexOf('&offset=') != -1 && location.href.indexOf('&offset=0') == -1) {var lt = l[0].getElementsByTagName('a')[2].innerHTML;} else if (l[0].getElementsByTagName('a')[1]) {var lt = l[0].getElementsByTagName('a')[1].innerHTML;} else if (l[0].getElementsByTagName('a')[0]) {var lt = l[0].getElementsByTagName('a')[0].innerHTML;} if (lt.indexOf('January ') != -1) {var Month = 'January'; var Mval = 1; var Day = lt.split('January ')[1].split(',')[0]; var Year = lt.split('January ')[1].split(', ')[1]; var Time = lt.split(', January ')[0];} else if (lt.indexOf('February ') != -1) {var Month = 'February'; var Mval = 2; var Day = lt.split('February ')[1].split(',')[0]; var Year = lt.split('February ')[1].split(', ')[1]; var Time = lt.split(', February ')[0];} else if (lt.indexOf('March ') != -1) {var Month = 'March'; var Mval = 3; var Day = lt.split('March ')[1].split(',')[0]; var Year = lt.split('March ')[1].split(', ')[1]; var Time = lt.split(', March ')[0];} else if (lt.indexOf('April ') != -1) {var Month = 'April'; var Mval = 4; var Day = lt.split('April ')[1].split(',')[0]; var Year = lt.split('April ')[1].split(', ')[1]; var Time = lt.split(', April ')[0];} else if (lt.indexOf('May ') != -1) {var Month = 'May'; var Mval = 5; var Day = lt.split('May ')[1].split(',')[0]; var Year = lt.split('May ')[1].split(', ')[1]; var Time = lt.split(', May ')[0];} else if (lt.indexOf('June ') != -1) {var Month = 'June'; var Mval = 6; var Day = lt.split('June ')[1].split(',')[0]; var Year = lt.split('June ')[1].split(', ')[1]; var Time = lt.split(', June ')[0];} else if (lt.indexOf('July ') != -1) {var Month = 'July'; var Mval = 7; var Day = lt.split('July ')[1].split(',')[0]; var Year = lt.split('July ')[1].split(', ')[1]; var Time = lt.split(', July ')[0];} else if (lt.indexOf('August ') != -1) {var Month = 'August'; var Mval = 8; var Day = lt.split('August ')[1].split(',')[0]; var Year = lt.split('August ')[1].split(', ')[1]; var Time = lt.split(', August ')[0];} else if (lt.indexOf('September ') != -1) {var Month = 'September'; var Mval = 9; var Day = lt.split('September ')[1].split(',')[0]; var Year = lt.split('September ')[1].split(', ')[1]; var Time = lt.split(', September ')[0];} else if (lt.indexOf('October ') != -1) {var Month = 'October'; var Mval = 10; var Day = lt.split('October ')[1].split(',')[0]; var Year = lt.split('October ')[1].split(', ')[1]; var Time = lt.split(', October ')[0];} else if (lt.indexOf('November ') != -1) {var Month = 'November'; var Mval = 11; var Day = lt.split('November ')[1].split(',')[0]; var Year = lt.split('November ')[1].split(', ')[1]; var Time = lt.split(', November ')[0];} else if (lt.indexOf('December ') != -1) {var Month = 'December'; var Mval = 12; var Day = lt.split('December ')[1].split(',')[0]; var Year = lt.split('December ')[1].split(', ')[1]; var Time = lt.split(', December ')[0];} var point = Time.length - 5; Timenum = Time.substring(point); Simpletime = 1*(Timenum.split(":")[0]); var TimeM = (Timenum.split(":")[1]); Time = Simpletime + (TimeM/60); j=i-1; if (l[j].innerHTML.indexOf('January ') != -1) {var LMonth = 'January'; var LMval = 1; var LDay = l[j].innerHTML.split('January ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('January ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', January ')[0];} else if (l[j].innerHTML.indexOf('February ') != -1) {var LMonth = 'February'; var LMval = 2; var LDay = l[j].innerHTML.split('February ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('February ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', February ')[0];} else if (l[j].innerHTML.indexOf('March ') != -1) {var LMonth = 'March'; var LMval = 3; var LDay = l[j].innerHTML.split('March ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('March ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', March ')[0];} else if (l[j].innerHTML.indexOf('April ') != -1) {var LMonth = 'April'; var LMval = 4; var LDay = l[j].innerHTML.split('April ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('April ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', April ')[0];} else if (l[j].innerHTML.indexOf('May ') != -1) {var LMonth = 'May'; var LMval = 5; var LDay = l[j].innerHTML.split('May ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('May ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', May ')[0];} else if (l[j].innerHTML.indexOf('June ') != -1) {var LMonth = 'June'; var LMval = 6; var LDay = l[j].innerHTML.split('June ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('June ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', June ')[0];} else if (l[j].innerHTML.indexOf('July ') != -1) {var LMonth = 'July'; var LMval = 7; var LDay = l[j].innerHTML.split('July ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('July ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', July ')[0];} else if (l[j].innerHTML.indexOf('August ') != -1) {var LMonth = 'August'; var LMval = 8; var LDay = l[j].innerHTML.split('August ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('August ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', August ')[0];} else if (l[j].innerHTML.indexOf('September ') != -1) {var LMonth = 'September'; var LMval = 9; var LDay = l[j].innerHTML.split('September ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('September ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', September ')[0];} else if (l[j].innerHTML.indexOf('October ') != -1) {var LMonth = 'October'; var LMval = 10; var LDay = l[j].innerHTML.split('October ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('October ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', October ')[0];} else if (l[j].innerHTML.indexOf('November ') != -1) {var LMonth = 'November'; var LMval = 11; var LDay = l[j].innerHTML.split('November ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('November ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', November ')[0];} else if (l[j].innerHTML.indexOf('December ') != -1) {var LMonth = 'December'; var LMval = 12; var LDay = l[j].innerHTML.split('December ')[1].split(',')[0]; var LYear = l[j].innerHTML.split('December ')[1].split(', ')[1]; var LTime = l[j].innerHTML.split(', December ')[0];} var lpoint = LTime.length - 5; LTimenum = LTime.substring(lpoint); LSimpletime = 1*(LTimenum.split(":")[0]); var LTimeM = (LTimenum.split(":")[1]); LTime = LSimpletime + (LTimeM/60); var E = i; var RU = E-IP; var OU = E-IP-NU-SYS-BOT; var UN = IP+NU; var ESUM = 100*(E - NS)/E; Year = Year.split(' ')[0].split('</a>')[0]; LYear = LYear.split(' ')[0].split('</a>')[0]; var cmothr = CDay - 1 + (CTime/24); var mothr = Day - 1 + (Time/24); var mothl = 30.42 - (LDay - 1 + LTime/24); if (CYear == LYear)  {  var cmdiff = 30.42*(CMval - LMval - 1);  var ctotdays = cmothr + mothl + cmdiff;  if (CMval == LMval)  {ctotdays = CDay - 1 + CTime/24 - (LDay - 1 + LTime/24);}  var caverage = E/ctotdays;  } if (CYear != LYear)  {  var cydiff = 365*(CYear - LYear - 1);  var cyearr = 30.42*(CMval - 1) + cmothr;  var yearl = 30.42*(12 - LMval - 1) + mothl;  var ctotdays = cyearr + cydiff + yearl;  var caverage = E/ctotdays;  } if (Year == LYear)  {  var mdiff = 30.42*(Mval - LMval - 1);  var totdays = mothr + mothl + mdiff;  if (Mval == LMval)  {totdays = Day - 1 + Time/24 - (LDay - 1 + LTime/24);}  var average = E/totdays;  var rvaverage = R/totdays;  var nonrvave = average - rvaverage;  } if (Year != LYear)  {  var ydiff = 365*(Year - LYear - 1);  var cydiff = 365*(CYear - LYear - 1);  var yearr = 30.42*(Mval - 1) + mothr;  var cyearr = 30.42*(CMval - 1) + cmothr;  var yearl = 30.42*(12 - LMval - 1) + mothl;  var totdays = yearr + ydiff + yearl;  var ctotdays = cyearr + cydiff + yearl;  var average = E/totdays;  var caverage = E/ctotdays;  var rvaverage = R/totdays;  var nonrvave = average - rvaverage;  } var Daylength = Math.round((1)*totdays)/1;  if (totdays < 1)  {  Daylength = 1;  } if (i == 1) { document.getElementById('bodyContent').innerHTML = ' There are no article modification statistics to show since there is only one edit. ' + firstbody; return; } var avenotice = ''; //wow..statistics people var caverage = Math.round((1000)*caverage)/1000; if (location.href.split("&offset=")[1] != undefined) {  if (location.href.split("&offset=0")[1] != undefined)   {   var offset = 'no';   }  else   {  caverage = ' [Value unknown]* ';  avenotice = ' *Average edits per day not shown because the most recent edit to this page is not visable ';   var offset = 'yes';   } } document.getElementById('bodyContent').innerHTML = ' Viewing article modification statistics (from the ' + E + ' edits shown on this page): ' + ' ' + Math.round((100)*R/E*100)/100 + '% marked reverts (any) (' + R + ' edit(s)) ' + ' '+ Math.round((100)*V/E*100)/100 + '% probable reverts of vandalism (' + V + ' edit(s)) ' + ' User statistics for these edits:  ' + Math.round((100)*IP/E*100)/100 + '% IP/anon edits (' + IP + ' edit(s)) ' +  Math.round((100)*NU/E*100)/100 + '% likely new user edits (' + NU + ' edit(s)) ' + Math.round((100)*(OU)/E*100)/100 + '% likely older user edits (non-admin/bot) (' + (OU) + ' edit(s)) ' + Math.round((100)*SYS/E*100)/100 + '% administrator edits (' + SYS + ' edit(s)) ' + Math.round((100)*BOT/E*100)/100 + '% bot edits (' + BOT + ' edit(s)) ' + ' Time range:  ' + Daylength + ' approximate day(s) of edits on this page  ' + 'Most recent edit on: ' + Simpletime + 'hr (UTC) -- ' + Day + ', ' + Month + ', ' + Year + ' ' + 'Oldest edit on: ' + LSimpletime + 'hr (UTC) -- ' + LDay + ', ' + LMonth + ', ' + LYear + ' ' + 'Current time: ' + CSimpletime + 'hr (UTC) -- ' + CDay + ', ' + CMonth + ', ' + CYear + ' ' + ' Averages:  ' + Math.round((100)*ESUM)/100 + '% edit summary usage ' + caverage + ' edit(s) per day (current) ' + Math.round((1000)*average)/1000 + ' edit(s) per day (since last active) ' + Math.round((1000)*rvaverage)/1000 + ' marked revert(s) per day (since last active)  ' + ' 1 : ' + Math.round((100)*rvaverage/nonrvave)/100 + ' regular edit to marked revert ratio (RE:RV)  ' + avenotice + oldbody; return; } //END

//From User:JesseW/monobook.js function addSinceTab {   var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if (window.location.href.indexOf("&limit=200&action=history&gotosince=true")!=-1) {      do_since_I_last_edited }   else if (location.href.indexOf("&action=history") != -1) {      var thetitle=document.title.slice(0, String(document.title).indexOf(" - ")); thetitle = thetitle.replace('&','%26').replace('&','%26').replace('&','%26').replace('&','%26'); var l=addlilink(tabs, "/w/index.php?title="+thetitle+"&limit=200&action=history&gotosince=true", 'since', ''); l.lastChild.title="Changes since I last edited"; } } //END

function do_since_I_last_edited {       var undefined; var csub=document.getElementById("contentSub"); var msg=document.createElement("p"); msg.appendChild(document.createTextNode			("Parsing history... please wait...")); msg.className="error"; csub.insertBefore(msg, csub.firstChild) var go = 'no'; var username = document.getElementById('pt-userpage').getElementsByTagName('a')[0].innerHTML; var hists = document.getElementById('bodyContent').getElementsByTagName('li'); var findcheck = document.getElementById('bodyContent'); if (hists[0].getElementsByTagName('a')[2].innerHTML == username) {msg.replaceChild(document.createTextNode("You were the last person to edit this page!"),msg.firstChild);; return;} for (var n=0; n<hists.length; n++) {	 if (hists[n].getElementsByTagName('a')[3]) {	    if (hists[n].getElementsByTagName('a')[3].innerHTML == username) {            hists[n].getElementsByTagName('input')[0].checked=true; if (n == 0){msg.replaceChild(document.createTextNode			 ("You were the last person to edit this page!"),			 msg.firstChild);; return;} location.href = hists[n].getElementsByTagName('a')[0].href; return; }           }	  else if (hists[n].getElementsByTagName('a')[2]) {	    if (hists[n].getElementsByTagName('a')[2].innerHTML == username) {            if (n == 0){msg.replaceChild(document.createTextNode			 ("You were the last person to edit this page!"),			 msg.firstChild);;} return; }           }          }	msg.replaceChild(document.createTextNode			 ("You have not recently edited this page!"),			 msg.firstChild); } //END //