User:49TL/monobook/old/2.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:49TL/monobook/old/2. |
/* <pre> */
////////////////////////////////////////////////////////////////////////////
// [[User:FireFox]]'s monobook.
// Most of it copied from some place or other and where it is, I've tried to give a source.
// If you want to copy any of it, I'd be flattered.
////////////////////////////////////////////////////////////////////////////
//<pre><nowiki>
/******************** Helper Functions (Needed) ********************/
// Helper tools
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
//
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 addToolboxLink(url, name, id){
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
addlilink(tb, url, name, id);
}
//
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 addlimenu(tabs, name, id)
{
var na = document.createElement('a');
na.href = '';
var mn = document.createElement('ul');
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.className = 'tabmenu';
li.appendChild(na);
li.appendChild(mn);
tabs.appendChild(li);
return li;
}
//
function getPname() {
z=document.getElementById("content").childNodes;
for (var n=0;n<z.length;n++) {
if (z[n].className=="firstHeading") return z[n].textContent;
};
}
// Get's the URL version of the page title.
function get_tidy_title()
{
var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
// cut everything up to "title=" from the start and everything past "&action=edit" from the end
editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit'));
return editlk;
}
function addLink(where, url, name, id, title, key, after){
//* where is the id of the toolbar where the button should be added;
// i.e. one of "p-cactions", "p-personal", "p-navigation", or "p-tb".
//
//* url is the URL which will be called when the button is clicked.
// javascript: urls can be used to do more complex things.
//
//* name is what will appear as the name of the button.
//
//* id is the id of the button; it's best to define one.
// Use a prefix to make sure its unique. Optional.
//
//* title is the tooltip title that gives a longer description
// of the button; if you define a accesskey, mention it here. Optional.
//
//* key is the char you want for the accesskey. Optional.
//
//* after is the id of the button you want to follow this one. Optional.
//
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);
var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
if(after) {
tabs.insertBefore(li,document.getElementById(after));
} else {
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;
}
// Adds "block" and "blocklog" tabs to User: and User talk: pages.
function add_block_tab()
{
var c1 = document.getElementById('column-one');
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
// use the "edit this page" tab to get already-tidied url
var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
// cut everything up to "title=" from the start and everything past "&action=edit" from the end
editlk = editlk.substring(editlk.indexOf('title=') + 6, editlk.lastIndexOf('&action=edit'));
editlk = editlk.substring(editlk.indexOf(':') + 1);
var slloc = editlk.indexOf('/');
if (slloc > 0)
editlk = editlk.substring(0, slloc);
// add "unblock" tab
addlilink(tabs, '/w/index.php?title=Special:Ipblocklist&action=unblock&ip=' + editlk, 'un');
// add "block" tab
addlilink(tabs, '/w/index.php?title=Special:Blockip&ip=' + editlk, 'block');
// To open the block page and block log simultaneously, replace the above line with:
// addlilink(tabs, 'javascript:blockpage_and_log("' + editlk + '")', 'Block');
// and uncomment the blockpage_and_log() function above.
// add "blocklog" tab
addlilink(tabs, '/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A' + editlk, 'log');
}
function do_onload()
{
if (document.title.indexOf('User:') == 0
|| document.title.indexOf('User talk:') == 0)
add_block_tab();
else if (document.title.indexOf('Block user') == 0) // could stand to be more robust
do_blockip_stuff();
}
/************* afd Helper ************/
// see User:Jnothman/afd_helper
document.write('<script type="text/javascript"' +
'src="http://en.wikipedia.org/w/index.php?title=User:Jnothman/automod.js' +
'&action=raw&ctype=text/javascript&dontcountme=s"></script>');
afdh_signature = '~~'+'~';
afdh_summaryprompt = true;
afdh_useicons = false;
afdh_shortcuts = Array();
afdh_shortcuts['d'] = 'Delete';
afdh_shortcuts['k'] = 'Keep';
afdh_shortcuts['m'] = 'Merge';
afdh_shortcuts['mv'] = 'Move';
afdh_shortcuts['rd'] = 'Redirect';
afdh_shortcuts['rw'] = 'Rewrite';
afdh_shortcuts['t'] = 'Transwiki';
afdh_shortcuts['wd'] = 'Weak delete';
afdh_shortcuts['sd'] = 'Strong delete';
afdh_shortcuts['sp'] = 'Speedy delete';
afdh_shortcuts['sk'] = 'Strong keep';
afdh_shortcuts['wk'] = 'Weak keep';
afdh_shortcuts['c'] = 'Comment';
afdh_icons = Array();
afdh_icons['d'] = afdh_icons['wd'] = afdh_icons['sd'] = afdh_icons['sp'] = 'Symbol delete vote.svg';
afdh_icons['k'] = afdh_icons['sk'] = afdh_icons['wk'] = 'Symbol keep vote.svg';
afdh_icons['m'] = 'Symbol merge vote.svg';
afdh_icons['c'] = 'Symbol comment vote.svg';
afdh_commscs = Array();
afdh_commscs['pn'] = 'per nom.';
function afd_helper() {
if (auto_mod())
return;
var anchors = new Array();
{
var oldanchors = document.getElementById('bodyContent').getElementsByTagName('a');
for (var i=0; i < oldanchors.length; i++)
anchors[i] = oldanchors[i];
}
var url_re = /\?title=Wikipedia:Articles_for_deletion\/([^&]+)&action=edit&/;
var url, matches;
for (var i=0; i < anchors.length; i++) {
if (!(matches = anchors[i].href.match(url_re))
|| (matches[1].substr(0, 4) == 'Log/'))
continue;
var na = document.createElement('a');
na.href = "javascript:afd_vote('"+escape(anchors[i].href)+"')";
na.title = "Vote on deletion of "+unescape(matches[1]);
var inlink = document.createElement('sup');
inlink.appendChild(document.createTextNode('vote'));
na.appendChild(inlink);
anchors[i].parentNode.insertBefore(na, anchors[i].nextSibling);
}
if (am_get_title().indexOf(':') == -1)
am_add_li('tb', 'javascript:afd_nominate()', 'Nominate AFD', '', 'Nominate this article for deletion');
}
function afd_vote(edit_link) {
var shortcuts_list = '';
for (var key in afdh_shortcuts)
shortcuts_list += key + ': ' + afdh_shortcuts[key] + '; ';
var vote = window.prompt("Enter your vote. (Shortcuts available are: "+shortcuts_list+")");
if (!vote) return;
var icon_link = '';
if (afdh_useicons && afdh_icons[vote.toLowerCase()])
icon_link = '[[Image:' + afdh_icons[vote.toLowerCase()] + '|20px]] ';
if (afdh_shortcuts[vote.toLowerCase()])
vote = afdh_shortcuts[vote.toLowerCase()];
shortcuts_list = '';
for (var key in afdh_commscs)
shortcuts_list += key + ': ' + afdh_commscs[key] + '; ';
var comment = window.prompt("Enter your comment. (Shortcuts available are: "+shortcuts_list+")");
if (typeof comment != 'string') return;
if (afdh_commscs[comment.toLowerCase()])
comment = afdh_commscs[comment.toLowerCase()];
var summary = vote;
if (afdh_summaryprompt)
if (!(summary = window.prompt("Enter the edit summary:", summary)))
summary = vote;
var url = edit_link +
'&amaddafter='+escape("* '''"+icon_link+vote+"''' "+comment+" "+afdh_signature) +
'&amsummary='+escape(summary);
if (window.location.href.indexOf("/Log/") == -1)
window.location.href = url;
else
window.open(url, "afd_helper_vote");
}
function afd_nominate() {
var title = am_get_title();
var log_date = window.prompt("This should be the date of the latest AFD log. Change it if necessary.", am_guess_date());
if (!log_date)
return;
var reason = window.prompt("Please justify your AFD nomination of "+title+":");
if (!reason)
return;
window.open(am_make_url(title, '{{'+'subst:afd}}', '', 'nomination for [[WP:AFD|deletion]]'), 'afdhn1');
window.open(am_make_url('Wikipedia:Articles for deletion/Log/'+log_date, '', '{{'+'subst:afd3|pg='+title+'}}', 'Nominating [['+title+']] for deletion'), 'afdhn3');
window.location.href = am_make_url('Wikipedia:Articles for deletion/'+title, '', '{{'+'subst:afd2|pg='+title+'|text='+reason+' '+afdh_signature+'}}', 'nominated for deletion');
}
$(afd_helper);
$(function(){ var x; if (x=document.getElementById('wpAnonOnly')) {x.checked=true;} });
//Change my traffic light status page
function edit_status(status)
{
if (status == 'in')
statnum = '3';
else if (status == 'out')
statnum = '1';
else statnum = '4';
document.editform.wpTextbox1.value = '<table align=right cellpadding="3" cellspacing="3" style="background-color: lightblue; border: 2px solid black;"><tr><td>[[Image:Traffic lights 4 states ' + statnum + '.png|20px]]</td><td><big>' +"'''I'm " + status + "!'''" + '<br style="clear:both;"> </big><span class="plainlinks">[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=purge}} <small> (Purge Server Cache)</small>]</span></td></tr></table>';
document.editform.wpSummary.value = status;
}
//From ABCD
function hideafd(){
var divs = document.getElementsByTagName("div");
for(var x = 0; x < divs.length; ++x)
if(divs[x].className.indexOf("vfd") != -1 || divs[x].className.indexOf("afd") != -1)
divs[x].style.display = "none";
document.getElementById('footer').style.display = 'none';
}
function showafd(){
var divs = document.getElementsByTagName("div");
for(var x = 0; x < divs.length; ++x)
if(divs[x].className.indexOf("vfd") != -1 || divs[x].className.indexOf("afd") != -1)
divs[x].style.display = "";
document.getElementById('footer').style.display = '';
}
function addlilink(tabs, url, name, id){
var na = document.createElement('a');
na.href = url;
na.id = id;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.appendChild(na);
tabs.appendChild(li);
return li;
}
//If you are not editing a page, a tab will appear allowing you to edit the 0th section of a page (the top area usually used as an introduction.
function addEditSection0() {
ta['ca-edit-0'] = ['', 'Edit the zeroth section of this page'];
if (!document.getElementById) return;
x = document.getElementById('ca-edit');
if(!x) return;
y = document.createElement('LI');
y.id = 'ca-edit-0';
if (x.className == 'selected') {
if (/&action=edit§ion=0$/.test(window.location.href)) {
x.className = 'istalk';
y.className = 'selected';
} else {
x.className = 'selected istalk';
}
} else if (x.className == 'selected istalk') {
if (/&action=edit§ion=0$/.test(window.location.href)) {
x.className = 'istalk';
y.className = 'selected istalk';
} else {
y.className = 'istalk';
}
} else {
y.className = x.className;
x.className = 'istalk';
}
z = document.createElement('A');
if (x.children) {
z.href = x.children[0].href + '§ion=0';
z.appendChild(document.createTextNode('0'));
y.appendChild(z);
document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling);
} else {
z.href = x.childNodes[0].href + '§ion=0';
z.appendChild(document.createTextNode('0'));
y.appendChild(z);
document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling);
}
}
if (document.title.indexOf("Editing ") == -1) {
if (window.addEventListener) window.addEventListener("load", addEditSection0, false);
else if (window.attachEvent) window.attachEvent("onload", addEditSection0);
}
function getPname() {
z=document.getElementById("content").childNodes;
for (var n=0;n<z.length;n++) {
if (z[n].className=="firstHeading") return z[n].textContent;
};
}
//
//Hybirdization of ABCD afd closer
function closeafd(bold, notbold){
var form = document.editform;
var txt = form.wpTextbox1;
txt.value = "{{subst:at}} '''" + bold + "'''" + notbold + ". ~~~\n" + txt.value + "\n{{subst:ab}}\n";
form.wpSummary.value = "close discussion: " + bold + notbold;
form.wpWatchthis.checked = false;
}
function afdresult(){
var res = prompt("Result?");
var day = prompt("On which day was it nominated?");
if(!res) return;
var form = document.editform;
form.wpSummary.value = 'AFD result';
var txt = form.wpTextbox1;
txt.value = '{{subst:oldafdfull|date=' + day + ' 06|result=' + res + '|votepage={{subst:PAGENAME}}}} \n' + txt.value;
txt.focus();
}
function afddelete(){
document.forms.deleteconfirm.wpReason.value = '[[Wikipedia:Articles for deletion/' + unescape(window.location.href.replace(/^.*\?title=([^&]+)&action=delete.*$/, '$1').replace(/_/g, ' ')).replace(/^(Talk|Wikipedia( talk)?):/, '') + ']]';
}
function replace(){
var s = prompt("Search regexp?");
if(s){
var r = prompt("Replace regexp?");
if(!r && r != '') return;
var txt = document.editform.wpTextbox1;
txt.value = txt.value.replace(new RegExp(s, "g"), r);
}
}
// appends msg to the currently-editted page, sets the summary to summ,
// and marks or unmarks the Watch this page checkbox according to watch.
function edit_summary_watch(msg, summ, watch)
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += msg;
f.wpSummary.value = summ;
}
function edit_summary_watch2(msg, summ, watch)
{
var f = document.editform, t = f.wpTextbox1;
t.value += msg;
f.wpSummary.value = summ;
}
function inoutaround(msg)
{
var f = document.editform, t = f.wpTextbox1;
t.value = "{{User:FireFox/Status2|" + msg + "}}";
f.wpSummary.value = "changing status";
}
function testn(number)
{
var page = prompt("Which message do you want to issue?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + "User:FireFox/" + page + "}} ~" + "~" + "~";
t.value += '\n';
f.wpSummary.value = "vandalism warning";
}
function testtwo(number)
{
var page = prompt("Which message do you want to issue?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + page + "}} ~" + "~" + "~";
t.value += '\n';
f.wpSummary.value = "{{" + page + "}}";
}
function testz(number)
{
var page = prompt("Which message do you want to issue?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "== {{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}} ==\n{{subst:" + "User:FireFox/" + page + "}} ~" + "~" + "~";
t.value += '\n';
f.wpSummary.value = "Message";
}
function blockuser(msg, other)
{
var f = document.getElementsByName('wpBlockReason')[0];
f.value = msg;
var j = document.getElementsByName('wpBlockOther')[0];
j.value = other;
}
function unblockuser(msg, other)
{
var f = document.getElementsByName('wpUnblockReason')[0];
f.value = msg;
}
function deleteg(number)
{
var page = prompt("Which criteria are you deleting under? \n 1: Nonsense \n 2: Test pages \n 3: Vandalism \n 4: Recreation of deleted material \n 7: Author request")
var f = document.getElementsByName('wpReason')[0];
f.value = "CSD" + " G" + page + "";
}
function deletea(number)
{
var page = prompt("Which criteria are you deleting under? \n 1: No context \n 2: Foreign language \n 3: No content, link only, spam \n 6: Attack pages \n 7: Non notable \n 8: Copyvio")
var f = document.getElementsByName('wpReason')[0];
f.value = "CSD" + " A" + page + "";
}
function deleter(number)
{
var page = prompt("Which criteria are you deleting under? \n 1: Redirect to non existant page \n 2: Redirect from main namespace to user namespace \n 3: Typo")
var f = document.getElementsByName('wpReason')[0];
f.value = "CSD" + " R" + page + "";
}
function deletei(number)
{
var page = prompt("Which criteria are you deleting under? \n 1: Redundant \n 2: Corrupt or empty \n 3: Improper license \n 4: No license, no source \n 5: Unused copyrighted images")
var f = document.getElementsByName('wpReason')[0];
f.value = "CSD" + " I" + page + "";
}
function deleteo(number)
{
var page = prompt("What is the page name?")
var f = document.getElementsByName('wpReason')[0];
f.value = "[[Wikipedia:Articles for deletion/" + page + "]]";
}
function deletey(number)
{
var f = document.getElementsByName('wpReason')[0];
f.value = "uncontested deletion";
}
function testo(number)
{
var page = prompt("Which AUTOMATICALLY SIGNED message do you want to issue?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + "User:FireFox/" + page + "}}";
f.wpSummary.value = "Message";
}
function testp(number)
{
var page = prompt("Which message do you want to issue?")
var variable= prompt("Is there a variable to go with this template?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + "User:FireFox/" + page + "|" + variable + "}}";
t.value += '\n';
f.wpSummary.value = "Message";
}
function testq(number)
{
var page = prompt("Which template(s) do you want to issue?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{" + page + "}}";
f.wpSummary.value = "{{" + page + "}}";
}
function testq2(number)
{
var page = prompt("Which template(s) do you want to issue?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "{{subst:" + page + "}}";
f.wpSummary.value = "{{subst:" + page + "}}";
}
function relist(number)
{
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += "{{subst:User:FireFox/relist}}";
f.wpSummary.value = "relist";
}
function list(number)
{
var page = prompt("Which page are you listing?")
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += "{{" + page + "}}";
f.wpSummary.value = "+[[" + page + "]]";
}
function testv(number)
{
var f = document.editform, t = f.wpTextbox1;
t.value = "";
}
function testr(number)
{
var f = document.editform, t = f.wpTextbox1;
t.value = "=== User reported ===\n<!-- Please report with the following format (copy and fill in) at the bottom of the list:\n\nIf unregistered IP:\n* {{IPvandal|IP}} optional brief reason for listing (keep it short) -- ~~~~ \n\nIf registered user:\n* {{vandal|username}} optional brief reason for listing (keep it short) -- ~~~~ \n\nDon't forget to sign with ~~~~ for the timestamp.\n\nPLEASE READ THE PAGE AND WP:VAND BEFORE POSTING A VANDAL HERE; reports that concern content disputes, even heated ones, may be removed without further action.\n\nGenerally, make sure that he or she had vandalised soon after a {{subst:test3}}, {{subst:test4}} or {{subst:bv}} warning. -->\n\n<!--REPORT BELOW HERE! -->";
f.wpSummary.value = "all blocked, list empty";
}
function tests(number)
{
var f = document.editform, t = f.wpTextbox1;
t.value = "=== User reported ===\n<!-- Please report with the following format (copy and fill in) at the bottom of the list:\n\nIf unregistered IP:\n* {{IPvandal|IP}} optional brief reason for listing (keep it short) -- ~~~~ \n\nIf registered user:\n* {{vandal|username}} optional brief reason for listing (keep it short) -- ~~~~ \n\nDon't forget to sign with ~~~~ for the timestamp.\n\nPLEASE READ THE PAGE AND WP:VAND BEFORE POSTING A VANDAL HERE; reports that concern content disputes, even heated ones, may be removed without further action.\n\nGenerally, make sure that he or she had vandalised soon after a {{subst:test3}}, {{subst:test4}} or {{subst:bv}} warning. -->\n\n<!--REPORT BELOW HERE! -->";
f.wpSummary.value = "vandal(s) not blocked ( ), list empty";
}
function testt(number)
{
var f = document.editform, t = f.wpTextbox1;
f.wpSummary.value = "blocked, list not empty";
}
function testu(number)
{
var f = document.editform, t = f.wpTextbox1;
f.wpSummary.value = "vandal(s) not blocked ( ), list not empty";
}
function support(number)
{
var f = document.editform, t = f.wpTextbox1;
f.wpSummary.value = "{{subst:User:FireFox/support}} ~~~ support";
}
function oppose(number)
{
var f = document.editform, t = f.wpTextbox1;
f.wpSummary.value = "{{subst:User:FireFox/oppose}} ~~~ oppose";
}
function neutral(number)
{
var f = document.editform, t = f.wpTextbox1;
f.wpSummary.value = "{{subst:User:FireFox/neutral}} ~~~ neutral";
}
// adds various tabs to call the above
function add_tabs()
{
var c1 = document.getElementById('column-one');
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
// Only add for pages with "Editing User talk:" somewhere in the title
if (document.title.indexOf("Editing User talk:") != -1)
{
addlimenu(tabs, 'talk messages', 'talkm');
var talkm = document.getElementById('talkm').getElementsByTagName('ul')[0];
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/1}}", "vandalism warning (1)", true, 1)',"test 1");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/2}}", "vandalism warning (2)", true, 1)',"test 2");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/3}}", "vandalism warning (3)", true, 1)',"test 3");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/4}}", "vandalism warning (4)", true, 1)',"test 4");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/1a}}", "message", true, 1)',"date");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/bv}}", "vandalism warning (bv)", true, 1)',"b-vandal");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/n}}", "vandalism warning", true, 1)',"new page");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/b}}", "blocked (vandalism)", true, 1)',"short block");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/i}}", "blocked (vandalism)", true, 1)',"indef block");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/s}}", "blocked (vandalism)", true, 1)',"sock block");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/u}}", "blocked (username)", true, 1)',"username");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/f}}", "blocked (username - non-latin characters)", true, 1)',"non-latin");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/w}}", "welcome", true, 1)',"welcome");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/email}}", "welcome + note", true, 1)',"email");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/Anon}}", "welcome", true, 1)',"anon");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/summary}}", "summary", true, 1)',"summary");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/subst}}", "subst", true, 1)',"subst");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/preview}}", "preview", true, 1)',"preview");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/tilde}}", "sign your posts", true, 1)',"tilde");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/c1}}", "civility (1)", true, 1)',"civil 1");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/c2}}", "civility (2)", true, 1)',"civil 2");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/npa1}}", "no personal attacks (1)", true, 1)',"npa 1");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/npa2}}", "no personal attacks (2)", true, 1)',"npa 2");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/npa3}}", "no personal attacks (3)", true, 1)',"npa 3");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/wr}}", "removing warnings (1)", true, 1)',"wr 1");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/wr2}}", "removing warnings (2)", true, 1)',"wr 2");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/s1}}", "spam warning (1)", true, 1)',"spam 1");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/s2}}", "spam warning (2)", true, 1)',"spam 2");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/s3}}", "spam warning (3)", true, 1)',"spam 3");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/bs}}", "blocked (spam)", true, 1)',"spam short");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/is}}", "blocked (spam)", true, 1)',"spam indef");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/3RR1}}", "three revert rule warning (1)", true, 1)',"3RR 1");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/3RR2}}", "three revert rule warning (2)", true, 1)',"3RR 2");
addlilink(talkm,'javascript:edit_summary_watch("{{subst:User:FireFox/3RR3}}", "blocked (three revert rule)", true, 1)',"3RR block");
}
if (document.title.indexOf("Editing User:") != -1)
{
addlimenu(tabs, 'userpage tags', 'talkm');
var talkm = document.getElementById('talkm').getElementsByTagName('ul')[0];
addlilink(talkm,'javascript:edit_summary_watch("{{subst:ibu}}", "blocked", true, 1)',"indefinite");
addlilink(talkm,'javascript:edit_summary_watch("{{indefblocked-username}}", "username block", true, 1)',"username");
addlilink(talkm,'javascript:edit_summary_watch("{{indefblocked-vandalism}}", "blocked", true, 1)',"vandalism");
addlilink(talkm,'javascript:edit_summary_watch("{{indef-latin}}", "username block", true, 1)',"non-latin");
addlilink(talkm,'javascript:edit_summary_watch("{{WoW}}", "willy on wheels", true, 1)',"wheels");
addlilink(talkm,'javascript:edit_summary_watch("{{WiC}}", "wikipedia is communism", true, 1)',"communism");
addlilink(talkm,'javascript:edit_summary_watch("{{GT}}", "general tojo", true, 1)',"tojo");
addlilink(talkm,'javascript:edit_summary_watch("{{JTV}}", "johnny the vandal", true, 1)',"johnny");
addlilink(talkm,'javascript:edit_summary_watch("{{BB}}", "bobby boulders", true, 1)',"bobby");
addlilink(talkm,'javascript:edit_summary_watch("{{milk}}", "milkman", true, 1)',"milk");
addlilink(talkm,'javascript:edit_summary_watch("{{KV}}", "kitten vandal", true, 1)',"kitten");
addlilink(talkm,'javascript:edit_summary_watch("{{MPS}}", "pelican shit vandal", true, 1)',"pelican");
addlilink(talkm,'javascript:edit_summary_watch("{{CapnCrack}}", "capn crack", true, 1)',"capn");
}
if (document.title.indexOf("Editing Image:") == 0)
{
addlilink(tabs, 'javascript:edit_summary_watch("{{subst:nld}}", "no licence", true, 1)',"licence");
addlilink(tabs, 'javascript:edit_summary_watch("{{subst:nsd}}", "no source", true, 1)',"source");
addlilink(tabs, 'javascript:edit_summary_watch("{{subst:nld}} {{subst:nsd}}", "no licence, no source", true, 1)',"licence + source");
}
if (document.title.indexOf("Editing User:") == 0)
{
addlilink(tabs, 'javascript:testv(1)',"clear");
}
if (document.title.indexOf("Editing Wikipedia:Administrator intervention against vandalism (section)") == 0)
{
addlilink(tabs, 'javascript:testr(1)',"blocked - empty");
}
if (document.title.indexOf("Editing Wikipedia:Administrator intervention against vandalism (section)") == 0)
{
addlilink(tabs, 'javascript:testt(1)',"blocked - not empty");
}
if (document.title.indexOf("Editing Wikipedia:Articles for deletion") == 0)
{
addlilink(tabs, 'javascript:relist(1)',"relist");
addlilink(tabs, 'javascript:closeafd(prompt("Result?"), "")', 'Result');
addlilink(tabs, 'javascript:closeafd("delete", "")', 'Delete');
}
if (document.title.indexOf("Editing Wikipedia:Articles for deletion/Log") == 0)
{
addlilink(tabs, 'javascript:list(1)',"list");
}
// if (document.title.indexOf("Wikipedia:Articles for deletion/Log/") != -1)
// {
// addlilink(tabs, 'javascript:hideafd()', 'Hide', 'ca-hide');
// addlilink(tabs, 'javascript:showafd()', 'Show', 'ca-show');
// }
if (document.title.indexOf("Editing User:FireFox/status") == 0)
{
addlilink(tabs, 'javascript:inoutaround("in")', "i");
addlilink(tabs, 'javascript:inoutaround("out")', "o");
addlilink(tabs, 'javascript:inoutaround("around")', "a");
addlilink(tabs, 'javascript:inoutaround("busy")', "b");
}
if (document.title.indexOf("Block user") == 0)
{
addlilink(tabs, 'javascript:blockuser("vandalism", "15 minutes")', "15 min");
addlilink(tabs, 'javascript:blockuser("vandalism", "3 hours")', "3 hrs");
addlilink(tabs, 'javascript:blockuser("vandalism", "24 hours")', "24 hrs");
addlilink(tabs, 'javascript:blockuser("vandalism", "96 hours")', "96 hrs");
addlilink(tabs, 'javascript:blockuser("vandalism", "indefinite")', "indefinite");
addlilink(tabs, 'javascript:blockuser("troll", "indefinite")', "troll");
addlilink(tabs, 'javascript:blockuser("{{username}}", "indefinite")', "username");
addlilink(tabs, 'javascript:blockuser("contains non-latin characters - {{username}}", "indefinite")', "non-latin");
addlilink(tabs, 'javascript:blockuser("willy on wheels", "indefinite")', "wheels");
addlilink(tabs, 'javascript:blockuser("user...", "indefinite")', "user...");
addlilink(tabs, 'javascript:blockuser("please contact an administrator for verification purposes, as described on this page", "indefinite")', "verification");
}
if (document.title.indexOf("Unblock user") == 0)
{
addlilink(tabs, 'javascript:unblockuser("temporarily removing block (reblock indefinitely)")', "indefinite");
addlilink(tabs, 'javascript:unblockuser("temporarily removing block (reblock for longer)")', "lengthen");
addlilink(tabs, 'javascript:unblockuser("temporarily removing block (block conflict)")', "conflict");
addlilink(tabs, 'javascript:unblockuser("unblock requested (via email)")', "email");
addlilink(tabs, 'javascript:unblockuser("blocked mistakenly")', "mistake");
addlilink(tabs, 'javascript:unblockuser("collateral damage")', "collateral");
addlilink(tabs, 'javascript:unblockuser("remove autoblock")', "autoblock");
}
if (document.title.indexOf("Confirm delete") == 0)
{
addlilink(tabs, 'javascript:deleteg(1)',"g");
addlilink(tabs, 'javascript:deletea(1)',"a");
addlilink(tabs, 'javascript:deleter(1)',"r");
addlilink(tabs, 'javascript:deletei(1)',"i");
addlilink(tabs, 'javascript:deletey(1)',"c");
addlilink(tabs, 'javascript:afddelete()',"!");
}
if (document.title.indexOf("Editing Talk:") == 0)
{
addlilink(tabs, 'javascript:afdresult()',"afd");
}
if (document.title.indexOf("Editing Wikipedia:Requests for adminship/") == 0)
{
addlilink(tabs, 'javascript:edit_summary_watch2("{{subst:User:FireFox/support}}", "support", true, 1)',"support");
}
}
if (window.addEventListener)
window.addEventListener("load", add_tabs, false);
else if (window.attachEvent)
window.attachEvent("onload", add_tabs);
function addtab(tabs, url, name, id){
var na = document.createElement('a');
na.href = url;
na.id = id;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.appendChild(na);
tabs.appendChild(li);
return li;
}
///////////////////////////////////////////////////////////////////
// AutoAFD by Korath
// This needs to change depending on skin used.
//////////////////////////////////////////////////////////////////
function add_link2(url, name)
{
var na = document.createElement('a');
na.setAttribute('href', url);
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.appendChild(na);
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
tabs.appendChild(li);
}
function strip_namespace(target)
{
var colon = target.indexOf(':');
if (colon != -1)
{
var spaces = new Array('User', 'Wikipedia', 'Image', 'MediaWiki', 'Template', 'Help', 'Category');
var ns = target.substring(0, colon);
if (ns == '' || ns == 'Talk')
return target.substring(colon + 1);
else
for (var i = 0; i < spaces.length; ++i)
{
if (ns == spaces[i]
|| ns == spaces[i] + '_talk')
return target.substring(colon + 1);
}
}
return target;
}
function autoafd()
{
if (document.title.indexOf('Editing ') == 0)
{
var action = '';
var target = '';
if (location.search)
{
var l = location.search.substring(1).split('&');
for (var i = 0; i < l.length; ++i)
{
var eq = l[i].indexOf('=');
var name = l[i].substring(0, eq);
if (name == 'fakeaction')
action = l[i].substring(eq + 1);
else if (name == 'faketarget')
target = unescape(l[i].substring(eq + 1)).replace(/_/g, ' ');
}
}
if (action == 'afdlist')
{
document.editform.wpTextbox1.value += '{{' + 'subst:afd3|pg=' + target + '}}\n';
document.editform.wpSummary.value = '[[Wikipedia:Articles for deletion/' + target + ']]';
}
else if (action == 'afdsub')
{
if (document.editform.wpTextbox1.value.length > 0)
{
target = document.editform.action;
target = unescape(target.substring(target.indexOf('title=') + 6, target.lastIndexOf('&action=submit'))).replace(/_/g, ' ');
window.alert("There's an old afd at the default location already.\n\n" +
'Please either move it out of the way (and update existing links to it), or file the Afd by hand in another location (such as [[' + target + ' (2)]]).');
}
else
document.editform.wpTextbox1.value += '{' + '{' + 'subst:afd2|pg=' + target + '|text=' + '}' + '}' +
'-- ~' + '~' + '~' + '~\n' +
'\n*\'\'\' \'\'\'\n*\'\'\' \'\'\'\n*\'\'\' \'\'\'\n';
}
}
}
if (window.addEventListener)
window.addEventListener('load', autoafd, false);
else if (window.attachEvent)
window.attachEvent('onload', autoafd);
function do_onload()
{
if (document.title.indexOf('User:') == 0
|| document.title.indexOf('User talk:') == 0)
add_block_tab();
else if (document.title.indexOf('Block user') == 0) // could stand to be more robust
do_blockip_stuff();
}
//From User:Func
if (window.addEventListener)
window.addEventListener("load", do_onload, false);
else if (window.attachEvent)
window.attachEvent("onload", do_onload);
if ( document.createElement && window.addEventListener )
{
function SoFixItInit() // pre-load, (don't want to slow down loading of article's content, though)
{
}
function SoFixItLoad() // post-load
{
UserMenu = new PortletMenu( 'p-personal' );
PageMenu = new PortletMenu( 'p-cactions' );
NavMenu = new PortletMenu( 'p-navigation' );
//ToolMenu = new PortletMenu( 'p-tb' );
// This is inefficient and not particularly robust.
// This comes first, I want this link to come up as
// fast as possible.
//
function GetByClass( sElem, sClass )
{ var i, a2 = [], a = document.getElementsByTagName( sElem );
for ( i = 0; i < a.length; i++ )
if ( a[ i ].className == sClass )
a2.push( a[ i ] );
return a2;
}
var a, td = GetByClass( 'td', 'diff-otitle' );
if ( ( td = td[ 0 ] ) && ( a = td.getElementsByTagName( 'a' )[ 0 ] ) )
a.href = a.href + '&action=edit'; // need to change text, later
var userName = UserMenu.getText( 'pt-userpage' );
// personal (top-most) menu
//
// Celestianpower Háblame Prefs Watchlist Contribs Kate VAN ESP Log out <UTCdate>
//
UserMenu.setText( 'pt-mytalk' , 'Talk' );
UserMenu.setText( 'pt-preferences', 'Preferences' );
UserMenu.setText( 'pt-watchlist' , 'Watchlist' );
UserMenu.setText( 'pt-mycontris' , 'Contributions' );
UserMenu.setText( 'pt-logout' , 'Log out' );
//
UserMenu.setHref( 'pt-mycontris',
'http://en.wikipedia.org/w/index.php?title=Special:Contributions&target=' +
userName + '&offset=0&limit=50' );
//
//
// it seems there is a stylesheet that makes them lowercase
//
// ok, the lowercased menu items are starting to really bug me:
//
document.getElementById( 'p-personal' ).getElementsByTagName( 'ul' )[0].style.textTransform = 'none';
//
UserMenu.insertBefore( 'pt-esp', 'pt-vandal', 'Status', 'http://en.wikipedia.org/w/index.php?title=User:FireFox/status&action=edit' );
if(document.getElementById('ca-edit'))
document.getElementById('ca-edit').firstChild.innerHTML = 'Edit';
// so I always know what time it is in UTC land:
//
UserMenu.append( 'pt-utc', UTCTime(), 'javascript:void UserMenu.setText("pt-utc",UTCTime())' );
// article-actions menu, (the "tabs")
//
if ( PageMenu[ 'ca-history' ] ) // theory: if it has a history tab, then it's purgable
{
PageMenu.insertBefore( 'ca-history', 'ca-lastdiff', 'last',
PageMenu.getHref( 'ca-history' ).replace( /action=history/, 'diff=0' ) );
PageMenu.getHref( 'ca-history' ).replace( /action=history/, 'action=purge');
PageMenu.setText( 'ca-edit' , 'Edit this page' );
PageMenu.setText( 'ca-history' , 'History' );
PageMenu.setText( 'ca-delete' , 'Delete' );
}
var x = 1;
NavMenu.append( 'n-' + x++, 'monobook.js', 'http://en.wikipedia.org/w/index.php?title=User:' + userName + '/monobook.js&action=edit' );
NavMenu.append( 'n-' + x++, 'monobook.css', 'http://en.wikipedia.org/w/index.php?title=User:' + userName + '/monobook.css&action=edit' );
NavMenu.append( 'n-' + x++, 'AfDs to be closed', 'http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Old' );
NavMenu.append( 'n-' + x++, 'Todays AfDs', 'http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Log/Today' );
NavMenu.append( 'n-' + x++, 'Speedy deletions', 'http://en.wikipedia.org/wiki/CAT:CSD' );
NavMenu.append( 'n-' + x++, 'RfA and RfB', 'http://en.wikipedia.org/wiki/WP:RFA' );
NavMenu.append( 'n-' + x++, 'Helpme', 'http://en.wikipedia.org/wiki/Category:Wikipedians looking for help' );
NavMenu.append( 'n-' + x++, 'Unblock', 'http://en.wikipedia.org/wiki/Category:Requests for unblock' );
NavMenu.append( 'n-' + x++, 'New users', 'http://en.wikipedia.org/w/index.php?title=Special:Log&type=newusers&user=&page=&limit=20&offset=0' );
NavMenu.append( 'n- ' + x++, 'Purge', 'http://en.wikipedia.org/w/index.php?title=' + getPname() + '&action=purge' );
}
function PortletMenu( id ) // constructor
{
this.menu = document.getElementById( id );
this.list = this.menu.getElementsByTagName( 'ul' )[ 0 ]; // bypass "<h5>Views</h5>", etc.
// sigh...as far as I can figure, there is empty whitespace being treated
// as TextNodes....
//
var LIs = this.list.getElementsByTagName( 'li' );
for ( var i = 0; i < LIs.length; i++ )
{
this[ LIs[ i ].id ] = LIs[ i ];
}
this.newItem = function( id, txt, url )
{ var li = document.createElement( 'li' ); li.id = id;
var a = document.createElement( 'a' ); a.href = url;
a.appendChild( document.createTextNode( txt ) );
li.appendChild( a );
this[ id ] = li; // watch this!!!
return li;
}
this.append = function( id, txt, url )
{ this.list.appendChild( this.newItem( id, txt, url ) );
}
this.insertBefore = function( old, id, txt, url )
{ this.list.insertBefore( this.newItem( id, txt, url ), this[ old ] );
}
// the ByTagName here is a bit annoying, but in Safari, I was picking
// up TextNodes by using this[ id ].firstChild.firstChild
//
this.getText = function( id ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data }
this.setText = function( id, txt ) { this[ id ].getElementsByTagName( 'a' )[ 0 ].firstChild.data = txt }
this.getHref = function( id ) { return this[ id ].getElementsByTagName( 'a' )[ 0 ].href }
this.setHref = function( id, url ) { this[ id ].getElementsByTagName( 'a' )[ 0 ].href = url }
// I add em as I need em....
}
function RemoveNode( id )
{ var node = document.getElementById( id )
node.parentNode.removeChild( node );
}
function UTCTime()
{
// Get a date stamp for the time in UTC-land.
//
// for the future: a format arg
//
var s = '',
d = new Date(),
a = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
return d.getUTCDate() + ' ' +
a[ d.getUTCMonth() ] + ' ' +
d.getUTCFullYear() + ' ' +
( '0' + d.getUTCHours() ).substr( -2 ) + ':' +
( '0' + d.getUTCMinutes() ).substr( -2 ) + ' ' + 'UTC';
}
SoFixItInit();
window.addEventListener( 'load', SoFixItLoad, false );
}
function NUPatrol()
{
if ( ( window.location.href.indexOf( 'Special%3ALog&type=newusers' ) == -1 ) &&
( window.location.href.indexOf( 'Special:Log/newusers' ) == -1 ) )
return; // make more robust???
var items, item, i, links, user, name, talk, contribs, insertLoc, link;
items = document.getElementById( 'bodyContent' ).getElementsByTagName( 'ul' )[ 0 ].getElementsByTagName( 'li' );
function NewLink( txt, url, plainlinks, linkColor )
{ var a = document.createElement( 'a' );
a.appendChild( document.createTextNode( txt ) );
a.href = url;
if ( plainlinks ) a.className = 'plainlinks';
if ( linkColor )
{ if ( typeof linkColor == "string" )
a.style.color = linkColor;
else a.style.color = '#FF0000'; // old default behavior
}
return a;
}
for ( i = 0; i < items.length; i++ )
{
item = items[ i ];
links = item.getElementsByTagName( 'a' );
user = links[ 0 ]; name = user.firstChild.nodeValue;
talk = links[ 2 ]; talk.firstChild.nodeValue = 'talk'; // lowercase 'Talk' for consistency
contribs = links[ 3 ];
insertLoc = user.nextSibling; // ' newusers '
item.insertBefore( document.createTextNode( ' ( ' ), insertLoc );
item.insertBefore( talk, insertLoc );
item.insertBefore( document.createTextNode( ', ' ), insertLoc );
item.insertBefore( contribs, insertLoc );
item.insertBefore( document.createTextNode( ', ' ), insertLoc );
item.insertBefore( NewLink( 'actions', '/w/index.php?title=Special%3ALog&user=' + name, true, '#000088' ), insertLoc );
item.insertBefore( document.createTextNode( ', ' ), insertLoc );
item.insertBefore( NewLink( 'blocks', '/w/index.php?title=Special%3ALog&type=block&page=User%3A' + name, true, '#008800' ), insertLoc );
item.insertBefore( document.createTextNode( ', ' ), insertLoc );
item.insertBefore( NewLink( 'is blocked?', '/wiki/Special:Ipblocklist?action=search&ip=' + name, true, '#888800' ), insertLoc );
item.insertBefore( document.createTextNode( ', ' ), insertLoc );
item.insertBefore( NewLink( 'do block!', '/w/index.php?title=Special:Blockip&ip=' + name, true, '#880000' ), insertLoc );
item.insertBefore( document.createTextNode( ' )' ), insertLoc );
item.removeChild( insertLoc.nextSibling ); // should remove the span
item.removeChild( insertLoc ); // should remove ' newusers ' text
}
}
if ( window.addEventListener ) window.addEventListener( 'load', NUPatrol, false );
else if ( window.attachEvent ) window.attachEvent( 'onload', NUPatrol );
function addEditSection0(){
if(!document.getElementById) return;
var x = document.getElementById('ca-edit');
if(!x) return;
var y = document.createElement('LI');
y.id = 'ca-edit-0';
if(x.className == 'selected'){
if(/&action=edit§ion=0$/.test(window.location.href)){
x.className = 'istalk';
y.className = 'selected';
} else {
x.className = 'selected istalk';
}
} else if(x.className == 'selected istalk'){
if(/&action=edit§ion=0$/.test(window.location.href)){
x.className = 'istalk';
y.className = 'selected istalk';
} else {
y.className = 'istalk';
}
} else {
y.className = x.className;
x.className = 'istalk';
}
var z = document.createElement('A');
if(x.children){
z.href = x.children[0].href + '§ion=0';
z.appendChild(document.createTextNode('0'));
y.appendChild(z);
document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling);
}else{
z.href = x.childNodes[0].href + '§ion=0';
z.appendChild(document.createTextNode('0'));
y.appendChild(z);
document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling);
}
z.title = 'Edit the zeroth section of this page';
akeytt();
}
/*
This tool hits the RSS feed for recent changes every 30 seconds or so
and checks for common vandalism. It does not make a separate server request
for every edit.
Currently, the RSS feed is full of holes and so this may miss many edits.
http://bugzilla.wikimedia.org/show_bug.cgi?id=3942
*/
// <pre><nowiki>
//DOWNLOADER
recent2={};
recent2.download=function(bundle) {
// mandatory: bundle.url
// bundle.onSuccess
// bundle.onFailure
// bundle.otherStuff OK too
var x = window.XMLHttpRequest ? new XMLHttpRequest()
: window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP")
: false;
if (x) {
x.onreadystatechange=function() {
x.readyState==4 && recent2.downloadComplete(x,bundle);
};
x.open("GET",bundle.url,true);
// x.setRequestHeader('Accept','text/*');
x.send(null);
}
}
recent2.downloadComplete=function(x,bundle) {
x.status==200 && ( bundle.onSuccess && bundle.onSuccess(x,bundle) || true )
|| ( bundle.onFailure && bundle.onFailure(x,bundle) || alert(x.statusText));
}
window.gettingBadWords=false;
window.badWords=null;
recent2.getBadWords=function() {
window.gettingBadWords=true;
recent2.download( { url: 'http://en.wikipedia.org/w/index.php?title=User:Lupin/badwords&action=raw&ctype=text/css',
onSuccess: recent2.processBadWords, onFailure: function () { recent2.runOnce(recent2.getBadWords, 15000); return true;}});
}
recent2.processBadWords=function(d) {
var data=d.responseText.split('\n');
var ret=[];
for (var i=0; i<data.length; ++i) {
var s=data[i];
if (s.length==0) continue;
if (s.charAt(0)=='<') continue;
ret.push(s.replace(RegExp('([-|.()\\+:!,?*^${}\\[\\]])', 'g'), '\\$1'));
}
// (( repeatedchar ) | ( ... | ... | ... ))( bdy )
window.badWords=RegExp("<td>[+]</td><td .*?>.*?(([^-{}.\\s'=wI:*#0-9A-F])\\2{2,}|\\b(" + ret.join('|') + "))(\\b|[|]).*</td>", 'im');
}
window.gettingWatchlist=false;
window.watchlist=null;
window.getWatchlist=function() {
window.gettingWatchlist=true;
recent2.download({url: 'http://en.wikipedia.org/wiki/Special:Watchlist/edit',
onSuccess: processWatchlist, onFailure: function () { recent2.runOnce(getWatchlist, 15000); return true; }});
}
window.processWatchlist=function(req, bundle) {
var watchlist={};
var lines=req.responseText.split('\n');
for (var i=0; i<lines.length; ++i) {
if (lines[i].indexOf('<li><input type="checkbox" name="id[]" value=') > -1) {
var article=lines[i].replace(/.*title="(.*?)">.*/, '$1');
watchlist[article]=true;
}
}
window.watchlist=watchlist;
}
recent2.runOnce=function(f, time) {
var i=recent2.runOnce.timers.length;
var ff = function () { clearInterval(recent2.runOnce.timers[i]); f() };
var timer=setInterval(ff, time);
recent2.runOnce.timers.push(timer);
}
recent2.runOnce.timers=[];
var feed='http://en.wikipedia.org/w/index.php?title=Special:Recentchanges&feed=rss';
window.newOutputDiv=function(klass, position, immortal) {
var h1=document.getElementsByTagName('h1')[0];
var ret=document.createElement('div');
if (klass) ret.className=klass;
if (!position) position='bottom';
switch(position) {
case 'top':
h1.parentNode.insertBefore(ret, h1.nextSibling);
break;
case 'bottom':
h1.parentNode.appendChild(ret);
break;
default:
if (!newOutputDiv.alerted) {
alert('Unknown position '+position+' in recent2.js, newOutputDiv');
window.newOutputDiv.alerted=true;
}
return newOutputDiv(klass, 'bottom');
}
if (!immortal) { ret.id=newOutputDiv.uid++; }
window.outputDivs.push(ret);
return ret;
}
window.newOutputDiv.alerted=false;
window.newOutputDiv.uid=0;
window.outputDivs=[];
window.grabRecentChanges=function(feed) {
if (! window.badWords && recent2.filter_badwords ) {
if ( ! window.gettingBadWords ) recent2.getBadWords();
return recent2.runOnce(function(){grabRecentChanges(feed);}, 500);
}
if (! window.watchlist && recent2.filter_watchlist) {
if (! window.gettingWatchlist ) getWatchlist();
return recent2.runOnce(function(){grabRecentChanges(feed);}, 500);
}
var pos=recent2.outputPosition;
if (recent2.outputPosition=='top') {
var output=newOutputDiv('recent2.lines', pos);
var status=newOutputDiv('recent2.status', pos);
} else {
var status=newOutputDiv('recent2.status', pos);
var output=newOutputDiv('recent2.lines', pos);
}
status.style.borderStyle='solid';
status.style.borderColor='orange';
status.innerHTML=greyFont+'(' + count + ') updating...</font>';
recent2.download({url: feed, onSuccess: processRecentChanges, output: output, status: status, onFailure: feedFailed});
}
var greyFont='<font color="#777">';
window.feedFailed=function(x,bundle) {
try { bundle.status.innerHTML+=greyFont+'failed: '+x.statusText + '</font>'; }
catch (err) { bundle.status.innerHTML+=greyFont+'failed badly: '+err+'</font>'; }
return true;
}
recent2.newWindows=true;
window.linkmaker=function(url, text) {
var s='<a href="' + url + '"';
recent2.newWindows && (s += ' target="_blank"');
s += '>' + text + '</a>';
return s;
}
recent2.ipUserRegex=RegExp('(User:)?((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])');
window.processRecentChanges=function(req, bundle){
var initialId=processRecentChanges.id;
var doc=req.responseXML.documentElement;
var items=doc.getElementsByTagName('item');
var latest=processRecentChanges.lastDate;
var output=[]; // <ul class="special">';
for (var i=0; i< items.length; ++i) {
var timestamp = Date.parse(getFirstTagContent(items[i],'pubDate'));
if (timestamp <= processRecentChanges.lastDate) continue;
latest = (timestamp > latest) ? timestamp : latest;
var diffText=getFirstTagContent(items[i],'description').split('</tr>').join('</tr>\n');
var editSummary=diffText.replace(RegExp('^<p>(.*?)</p>[\\s\\S]*'), '$1');
var editor=getFirstTagContent(items[i], 'creator') || getFirstTagContent(items[i], 'dc:creator');
if (recent2.filter_anonsOnly && !recent2.ipUserRegex.test(editor)) continue;
var articleTitle=getFirstTagContent(items[i], 'title');
if (! recent2.show_talkpages && articleTitle && /^Talk:|^[^:]*?[_ ]talk:/.test(articleTitle)) continue;
if (recent2.filter_watchlist && articleTitle &&
! window.watchlist[articleTitle.replace(/^Talk:/, '').replace(/[ _]talk:/, ':')]) continue;
if (recent2.filter_badwords) {
var badMatch=null;
if (window.vandals[editor] > 0) badMatch=['', '[previously rolled back this editor]'];
else badMatch=badWords.test(diffText); // .test() is meant to be faster than a full match
if (badMatch) {
badMatch=diffText.match(badWords);
var article=getFirstTagContent(items[i], 'link');
articleTitle=getFirstTagContent(items[i], 'title');
var id=processRecentChanges.id;
// highlighting
badMatch[0]=badMatch[0].split(badMatch[1]).join('<span style="background-color: #FF6">'+badMatch[1]+'</span>');
output.push(recent2.doLine({timestamp: timestamp, article:article, articleTitle:articleTitle,
editor:editor, id:id, badWord:badMatch[1], badDiffFragment:badMatch[0], diff:diffText,
summary:editSummary}));
processRecentChanges.id++;
}
}
else {
var article=getFirstTagContent(items[i], 'link');
var articleTitle=getFirstTagContent(items[i], 'title');
if (recent2.CustomFilter &&
! recent2.CustomFilter({timestamp:timestamp, article:article, articleTitle:articleTitle,
editor:editor, diff:diffText, summary:editSummary})) continue;
var id=processRecentChanges.id;
output.push(recent2.doLine({timestamp: timestamp, article:article, articleTitle:articleTitle,
editor:editor, id:id, diff:diffText, summary:editSummary}));
processRecentChanges.id++;
}
} /* end for loop */
//output+='</ul>';
var outputString='';
if (recent2.outputPosition=='top') {
outputString=output.join('');
}
else {
for (var i=output.length-1; i>=0; --i) {
outputString+=output[i];
}
}
bundle.output.innerHTML+=outputString;
recent2.runOnce(function() {recent2.doPopups(bundle.output)}, 300);
processRecentChanges.lastDate=latest; // - 1; // overlap better than missing some out, i think; FIXME do this properly
var statusTail=greyFont+'done up to ' + formatTime(latest) + '</font>';
if (processRecentChanges.id > initialId) {
statusTail+=' <a href="javascript:showHideDetailRange(' + initialId + ',' + processRecentChanges.id + ')">toggle these details</a> |';
}
statusTail += ' <a href="javascript:deleteEarlierOutputDivs(' + bundle.status.id + ')">remove earlier output</a>';
statusTail+='<br>';
bundle.status.innerHTML+=statusTail;
}
processRecentChanges.lastDate=0;
processRecentChanges.id=0;
window.deleteEarlierOutputDivs=function(cur) {
for(var i=0; i<outputDivs.length; ++i) {
if (!outputDivs[i] || !outputDivs[i].id) continue;
if (outputDivs[i].id >= 0 && outputDivs[i].id < cur) {
// FIXME BUG: if we go from the bottom up, then we'll delete one too many or too few, or something :-)
outputDivs[i].parentNode.removeChild(outputDivs[i]);
outputDivs[i]=null;
}
}
// scroll to the top if we're appending output to the bottom, to keep the div we've clicked visible after the deletions
if (recent2.outputPosition!='top') document.location='#';
}
window.showHideDetailRange=function(start,end) {
// use the first div to see if we should show or hide
var div=document.getElementById('diff_div_' + start);
if (!div) return;
var state=false; // hide
if (div.style.display=='none') state=true; // show
for (var i=start; i<end; ++i) {
showHideDetail(i, true, state);
}
}
window.toggleSysopEdits=function() {
var divs=document.getElementsByTagName('div');
for (var i=0; i<divs.length; ++i) {
if (divs[i].className=='sysop_edit_line') divs[i].style.display= ( toggleSysopEdits.hidden ? 'none' : 'inline' );
}
toggleSysopEdits.hidden = ! toggleSysopEdits.hidden;
}
window.bundles={};
window.vandalColour = function(vandal) {
var num=window.vandals[vandal];
if (!num) return '';
switch (num) {
case 1: return '#DDFFDD';
case 2: return '#BBFFBB';
}
var i= 9-(num - 3) *2;
if (i < 0) i=0;
return '#' + i + i + 'FF' + i + i;
}
window.clickDetails=function(action, max) {
if(!action) action='show';
if (!max) max = document.links.length;
var count=0;
for (var i=0; i<document.links.length && count < max; ++i) {
if(document.links[i].innerHTML==action + ' details' && document.links[i].href.indexOf('javascript:') == 0) {
++count;
eval(document.links[i].href.replace('javascript:', ''));
}
}
}
recent2.pendingLines=[];
recent2.togglePausedOutput=function() {
if (!recent2.pausedOutput) { recent2.pausedOutput = true; return true; }
else recent2.pausedOutput=false;
var outputBuffer='';
while (recent2.pendingLines.length) {
outputBuffer+=recent2.doLine(recent2.pendingLines.pop());
}
var pos=recent2.outputPosition;
var output=newOutputDiv('recent2.lines', pos);
output.innerHTML=outputBuffer;
return false;
}
recent2.togglePaused=function() {
if(!recent2.paused) { recent2.paused=true; return true; }
recent2.paused=false;
loopRecentChanges(loopRecentChanges.url, loopRecentChanges.iterations);
return false;
}
recent2.doLine=function(bundle) {
if (recent2.pausedOutput) {
recent2.pendingLines.push(bundle);
return '';
}
var wikiBase='http://en.wikipedia.org/wiki/';
var sysop = null;
if (typeof sysops != 'undefined') sysop=sysops.test(bundle.editor);
var lastDiffPage=bundle.article + '?diff=cur&oldid=prev';
bundle.url=lastDiffPage;
saveBundle(bundle);
var div='';
if (window.vandals[bundle.editor] > 0) { div='<div style="background-color:' + vandalColour(bundle.editor) + '">'}
else if (sysop) {div='<div class="sysop_edit_line">'};
return div +
'<li>' +
formatTime(bundle.timestamp) + ' ' +
//latest + ' ' + processRecentChanges.lastDate + ' ' +
linkmaker(lastDiffPage, bundle.articleTitle) +
( bundle.badWord ? ' matched <b>' + bundle.badWord + '</b> . . ' : ' . . ') +
linkmaker(wikiBase + 'User:' + bundle.editor, bundle.editor) + ' (' +
linkmaker(wikiBase + 'User_talk:' + bundle.editor, 'talk') + ' | ' +
linkmaker(wikiBase + 'User_talk:' + bundle.editor + '?action=edit' +
'&autoedit=s#$#\\n{{subst:bv-n|' + bundle.articleTitle + '}}%20~~~~#&autosummary=Your%20recent%20edits',
'warn') + ' | ' +
linkmaker(wikiBase + 'Special:Contributions/' + bundle.editor, 'contribs') + ' | ' +
linkmaker(wikiBase + 'Special:Blockip/' + bundle.editor, 'block') + ') . . ' +
( bundle.summary ? '<i>('+bundle.summary+')</i> . . ' : '') +
'<a href="javascript:showHideDetail(' + bundle.id + ')" id="showdiff_link_' + bundle.id + '">show details</a>' +
' [<a href="javascript:tryRollback(' + bundle.id + ')">rollback</a>]' +
'<p><div id="diff_div_' + bundle.id + '" style="display: none">' +
'</div></li>' +
( div ? '</div>' : '') ;
}
window.saveBundle= function(bundle) {
var z={};
for (var prop in bundle) { z[prop]=bundle[prop]; }
window.bundles[bundle.id]=z;
}
window.vandals={}
window.tryRollback=function(id) {
var b=window.bundles[id];
var vandal=b.editor;
if (window.vandals[vandal]==null) window.vandals[vandal]=1;
else window.vandals[vandal]++;
if (!b) { alert('No bundle! Please tell Lupin how to reproduce this error - it should not really happen.'); return; }
var onSuccess=function (x, bundle) {
var rollRe=RegExp('<a href="(/w/index.php[^"]*?action=rollback[^"]*?from=([^&]*)[^"]*?)".*?<br />(<span[^>]*>)?(.*?)(</span>)?<br /></td>');
// match[0]: useless
// match[1]: url (escaped)
// match[2]: last editor (escaped)
// match[4]: last edit summary (wikiText - FIXME strip this to plain text)
var match=rollRe.exec(x.responseText);
if (!match) {
alert('No rollback link found.\nSadly rollback is only available to admins. Alternatively, this may be a bug.');
return;
}
var lastEditor=match[2].split('+').join(' ');
var lastSummary=match[4];
// var vandal=b.editor; // from the closure
if (lastEditor != vandal) {
var summary=lastSummary.replace(RegExp('<[^>]*?>','g'),'');
if (!summary) summary=lastSummary;
alert( 'Could not rollback - someone else has edited since the vandal.\n\nPage: '+ b.articleTitle +
'\nVandal: '+vandal+'\nLast editor: '+lastEditor+'\nEdit summary: '+summary);
return;
}
var rollbackUrl=match[1].split('&').join('&');
// confirm('Rollback edits by '+vandal + ' to '+b.articleTitle+'?') &&
window.open(rollbackUrl, '_blank');
}
var onFailure = function(x,bundle) {
alert('HTTP failed when trying to get rollback link in url\n' + bundle.url +
'\n\nHTTP status text: ' + x.statusText);
return true;
}
recent2.download({ url:b.url, onSuccess: onSuccess, id: b.id, onFailure:onFailure});
}
recent2.doPopups=function(div) {
if (typeof(mouseOverWikiLink)!='undefined' &&
typeof(mouseOutWikiLink) !='undefined' &&
typeof(killPopup) !='undefined') {
var anchors=div.getElementsByTagName('A');
for (var i=0; i<anchors.length; ++i) {
var a=anchors[i];
if (a.href.indexOf('javascript')==0) continue;
a.onmouseover=mouseOverWikiLink;
a.onmouseout= mouseOutWikiLink;
a.onclick= killPopup;
}
}
}
window.formatTime=function(timestamp) {
var date=new Date(timestamp);
nums=[date.getHours(), date.getMinutes(), date.getSeconds()];
for (var i=0; i<nums.length; ++i) if (nums[i]<10) nums[i]='0'+nums[i];
return nums.join(':');
}
window.showHideDetail = function(id, force, state) {
var div=document.getElementById('diff_div_' + id);
var lk=document.getElementById('showdiff_link_' + id);
if (!div) return;
var bundle=window.bundles[id];
if (!div.innerHTML) div.innerHTML= ( bundle.badDiffFragment ? bundle.badDiffFragment:'') + bundle.diff;
if ((force && state==true) || (!force && div.style.display=='none')) { div.style.display='inline'; lk.innerHTML='hide details'; }
else { div.style.display='none'; lk.innerHTML='show details'; }
}
window.getFirstTagContent=function(parent, tag) {
var e=parent.getElementsByTagName(tag);
if (e && (e=e[0]) ) {
var ret = e.firstChild.nodeValue || e.nodeValue;
if (typeof ret != typeof '') return '';
return ret;
}
}
recent2.controlUI=function() {
recent2.controls=newOutputDiv('recent2.controls', 'top', true);
var talk=document.createElement('input');
talk.type='checkbox';
talk.checked=!recent2.show_talkpages;
talk.onclick=function(){ recent2.show_talkpages=!this.checked; }
recent2.controls.appendChild(talk);
recent2.controls.talk=talk;
var label=document.createElement('label');
label.innerHTML='Hide talk pages';
recent2.controls.appendChild(label);
}
var count=0;
window.loopRecentChanges=function(url, iterations) {
if (!iterations) iterations=20;
loopRecentChanges.iterations=iterations;
loopRecentChanges.url=url;
grabRecentChanges(url);
recent2.runOnce(function () {
if (recent2.paused) {++count; return; }
if (++count >= iterations && ! confirm('Continue monitoring recent changes?') ) return;
count %= iterations; loopRecentChanges(url, iterations);
}, 30000);
}
window.marvin=function() {
window.sysops=RegExp("^(\\-\\- April|23skidoo|A Man In Black|ABCD|ALoan|Academic Challenger|Acetic Acid|Adam Bishop|Ahoerstemeier|Alabamaboy|Alai|AlainV|Alex S|Alex756|AlistairMcMillan|Alkivar|Allen3|AllyUnion|Alteripse|Ambi|Ams80|Andres|Andrevan|Andrew Yong|Andrewa|Andris|Android79|Angela|Angr|Antandrus|Anthere|AntonioMartin|Aranel|Arcadian|Aris Katsaris|Arminius|Arvindn|Arwel Parry|Asbestos|AstroNomer|Ausir|AxelBoldt|BanyanTree|BaronLarf|Bcorr|Bdesham|Bearcat|Beland|Benc|Bhadani|Biekko|BillyH|Bishonen|Bkonrad|Blankfaze|Bluemoose|Bmicomp|Bovlb|Bratsche|Brian Kendig|Brian0918|BrianSmithson|Briangotts|Brighterorange|Brion VIBBER|Brockert|BrokenSegue|Brookie|Bryan Derksen|Bumm13|Burgundavia|CJCurrie|COGDEN|CSTAR|CYD|Cacycle|Caltrop|CambridgeBayWeather|Camembert|Canderson7|Capitalistroadster|Carbonite|Carnildo|Catbar|CatherineMunro|Cburnett|Cdc|Cecropia|Cedar\\-Guardian|Celestianpower|CesarB|Cgs|Chadloder|Chancemill|Changlc|Charles Matthews|Chmod007|Chris 73|Chris Roy|ChrisO|Christopher Mahan|Chuck SMITH|Chuq|Cimon avaro|Clarkk|Clifford Adams|ClockworkSoul|Commander Keane|ContiE|Cool Hand Luke|Cprompt|Craigy144|Cryptic|CryptoDerk|Curps|Cutler|Cyan|Cyberjunkie|CyborgTosser|Cyp|Cyrius|DESiegel|DF08|DJ Clayworth|Dale Arnett|Dan100|DanKeshet|Daniel Quinlan|DanielCD|Danny|Dante Alighieri|Darwinek|Dave souza|David Gerard|David Newton|David\\.Monniaux|DavidLevinson|DavidWBrooks|Davidcannon|Davodd|Dbachmann|Dbenbenn|Dbiv|Dcoetzee|Deb|Decumanus|Delirium|Denelson83|Denni|Derek Ross|Dgrant|Diberri|Dieter Simon|Dino|Dmcdevit|Dmn|Doc glasgow|Docu|Dori|Dpbsmith|DrBob|DragonflySixtyseven|Dragons flight|Drini|DropDeadGorgias|Duk|Duncharris|Durin|Dvyost|Dwheeler|Dysprosia|Earl Andrew|Ed Poor|Ed g2s|Edcolins|Edward|Efghij|Egil|El C|Elf|Ellsworth|Eloquence|Enchanter|Essjay|Eugene van der Pijll|Evercat|Everyking|Evil Monkey|Evil saltine|Evilphoenix|Exploding Boy|Ezhiki|FCYTravis|Fabiform|Fantasy|Fastfission|Fawcett5|Feco|FeloniousMonk|Fennec|Ferkelparade|Fernando Rizo|Ffirehorse|Filiocht|Finlay McWalter|Fire Star|FireFox|Flcelloguy|Flockmeal|Francs2000|Frazzydee|Fred Bauder|Fredrik|Freestylefrappe|FreplySpang|Friday|Func|Furrykef|Fuzheado|Fvw|G\\-Man|Gabbe|Gadfium|Gamaliel|Garzo|Gaz|Gdr|GeneralPatton|Geni|Gentgeen|Geogre|Gerald Farinas|Goatasaur|Golbez|Graft|GregAsche|GregRobson|Grenavitar|Grm wnr|Ground Zero|Grue|Grunt|Grutness|Gtrmp|Guettarda|Gwalla|Gyrofrog|Hadal|Hajor|Hall Monitor|HappyCamper|Hashar|Hawstom|Hcheney|Hedley|Hemanshu|Henrygb|Hephaestos|Hermione1980|Heron|Homeontherange|Humblefool|Hyacinth|Icairns|IceKarma|Ihcoyc|Ike9898|Ilyanep|Improv|Imran|Infrogmation|Ingoolemo|Inter|Isomorphic|Ixfd64|J\\.J\\.|JCarriker|JHK|JIP|JRM|JYolkowski|Jake Nelson|Jallan|JamesTeterenko|Jamesday|Jasonr|Jaxl|Jay|Jayjg|Jcw69|Jdavidb|Jdforrester|JeLuF|Jeffrey O\\. Gustafson|Jengod|JeremyA|Jeronimo|Jerzy|JesseW|Jfdwolff|Jiang|Jimbo Wales|Jimfbleak|Jimregan|Jinian|Jitse Niesen|Jmabel|Jnc|Jni|JoJan|John Kenney|JohnOwens|Johnleemk|Johntex|JonMoore|Jondel|Joolz|Josh Grosse|Jossifresco|Journalist|Joy|Joy Stovall|Jpgordon|Jrdioko|Jredmond|Jtdirl|Jtkiefer|Justinc|Jwrosenzweig|K1Bond007|KF|Kaihsu|Kaldari|Karada|Karen Johnson|Karmafist|Katefan0|Kbdank71|Kelly Martin|Khaosworks|Khendon|Khym Chanur|Kingturtle|Kirill Lokshin|Kmccoy|Knowledge Seeker|Kosebamse|Ktsquare|Kwamikagami|Kzollman|LC|Lachatdelarue|Lacrimosus|Lectonar|Lee Daniel Crocker|Lexor|Linuxbeak|LittleDan|Llywrch|Lommer|Longhair|Lord Emsworth|LordAmeth|LouI|Lowellian|Lucky 6\\.9|Ludraman|Lupin|Lupo|MC MasterChef|MacGyverMagic|Mackensen|Mackeriv|Madchester|Magnus Manske|Mailer diablo|Mairi|Malcolm Farmer|Manning Bartlett|Marianocecowski|Marine 69\\-71|Mark|Mark Christensen|Mark Dingemanse|Mark Richards|MarkSweep|Markalexander100|Marshman|Marudubshinki|Marumari|Master Thief Garrett|Matt Crypto|Maury Markowitz|Maveric149|Maximus Rex|Mbecker|Meelar|Mel Etitis|Menchi|Merovingian|Merphant|Mic|Michael Hardy|Michael Snow|Mike Halterman|Mikkalai|Mindspillage|Minesweeper|Mintguy|Mirv|Mirwin|Mkmcconn|Mkweise|Modemac|Moink|Moncrief|Montrealais|Moriori|Morven|Morwen|Mulad|Mustafaa|MyRedDice|MykReeve|Mysekurity|Mzajac|Nabla|Nandesuka|Nanobug|Necrothesp|Neutrality|Ngb|Nichalp|NicholasTurnbull|Nickptar|Nickshanks|Niteowlneils|Nohat|Noldoaran|Notheruser|Nufy8|Nunh\\-huh|Nv8200p|Oberiko|OldakQuill|Oleg Alexandrov|Oliver Pereira|Olivier|Omegatron|Optim|Ortolan88|Oven Fresh|OwenX|PFHLai|PMA|PRueda29|PZFUN|Pakaran|Pamri|Patrick|Paul A|Paul August|Pcb21|PedanticallySpeaking|Petaholmes|Peter Winnberg|Pfortuny|Pharos|Phil Bordelon|Phil Boswell|Phils|Philwelch|Phroziac|Physchim62|PierreAbbat|Piotrus|Pjacobi|Pollinator|Poor Yorick|Postdlf|Pratyeka|Premeditated Chaos|Proteus|Psy guy|Qaz|Quadell|Quercusrobur|R\\. fiend|R3m0t|RHaworth|RJFJR|RN|Radiant\\!|RadicalBender|Ragib|Ral315|Ram\\-Man|Rama|Ramallite|Ran|Raul654|Rbrwr|Rd232|Rdsmith4|RedWolf|RedWordSmith|Redux|Redwolf24|Refdoc|Reflex Reaction|Rfl|Rhobite|Rholton|Rhymeless|Rich Farmbrough|Rick Block|RickK|Rje|Rlandmann|Rlquall|Rmhermen|Roadrunner|RobLa|Robchurch|Robert Merkel|RobertG|Robin Patterson|RobyWayne|Roozbeh|RoseParks|Rossami|RoyBoy|RoySmith|Rx StrangeLove|Ryan Delaney|SD6\\-Agent|SWAdair|Salsa Shark|Sam Hocevar|Sam Korn|Sango123|Sannse|Sarge Baldy|Sasquatch|Schissel|Schneelocke|Scimitar|Scipius|Scott Burley|ScottDavis|Seabhcan|Sebastiankessel|Secretlondon|Seglea|Sesel|Seth Ilys|Sfoskett|Shanes|Shauri|Sheldon Rampton|Shimgray|SimonP|Siroxo|Sj|Sjakkalle|Sjc|Slambo|SlimVirgin|Slowking Man|Slrubenstein|Smith03|Sn0wflake|Snowspinner|Snoyes|Solipsist|Someone else|Sortior|Spangineer|Spencer195|Splash|Ssd|Stan Shebs|Starblind|Stevenj|Stevertigo|Stewartadcock|Stormie|Sugarfish|Sundar|Sverdrup|TPK|TUF\\-KAT|Ta bu shi da yu|Talrias|Tannin|Tarquin|Taw|Taxman|TenOfAllTrades|Texture|Thames|The Anome|The Cunctator|The Epopt|The Singing Badger|The wub|TheCoffee|TheoClarke|Theresa knott|Thryduulf|Thue|Thunderbrand|Tillwe|Tim Ivorson|Tim Starling|Timc|Timrollpickering|Timshell|Timwi|Titoxd|Tkinias|Toby Bartels|Tom\\-|Tomf688|Tompagenet|Tony Sidaway|Topbanana|Tregoweth|Trevor macinnis|Triddle|Trilobite|Tristanb|Ugen64|Ulayiti|Uncle G|UninvitedCompany|Urhixidur|Utcursch|UtherSRG|Vague Rant|VampWillow|Vancouverguy|Vaoverland|Viajero|Vicki Rosenzweig|Violetriga|Visorstuff|Voice of All\\(MTG\\)|Vsmith|Waltpohl|Wapcaplet|Warofdreams|Wayward|Wernher|Wesley|WhisperToMe|Who|Wiglaf|Wikiacc|Wikibofh|Wile E\\. Heresiarch|Wilfried Derksen|Willmcw|Woggly|WojPob|Woohookitty|Worldtraveller|Ww|Wwoods|XJamRastafire|Xezbeth|Y0u|Yacht|Zanimum|Zero0000|Zippy|Zocky|Zoe|Zoicon5|Zoney|Zscout370|Zzyzx11)$");
recent2.show_talkpages=true;
recent2.controlUI();
loopRecentChanges(feed, 200);
}
// **************************************************
// Installation
// **************************************************
recent2.addlilink=function(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;
}
recent2.addToolboxLink=function(url, name, id){
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
recent2.addlilink(tb, url, name, id);
}
window.addMarvin=function() {
recent2.addToolboxLink('http://en.wikipedia.org/wiki/User:Lupin/Filter_recent_changes', 'Filter recent changes', 'toolbox_filter_changes');
recent2.addToolboxLink('http://en.wikipedia.org/wiki/User:Lupin/All_recent_changes', 'All recent changes', 'toolbox_all_changes');
recent2.addToolboxLink('http://en.wikipedia.org/wiki/User:Lupin/Recent_IP_edits', 'Recent IP edits', 'toolbox_IP_edits');
recent2.addToolboxLink('http://en.wikipedia.org/wiki/User:Lupin/Monitor_my_watchlist', 'Monitor my watchlist', 'toolbox_watchlist_edits');
//document.getElementById('toolbox_filter_changes').onclick=marvin;
}
window.maybeStart=function() {
var loc=document.location.href;
if (RegExp('User:Lupin/Filter[_ ]recent[_ ]changes','i').test(loc)) {
recent2.filter_badwords=true;
recent2.runOnce(marvin, 1000);
}
else if (RegExp('User:Lupin/All[_ ]recent[_ ]changes','i').test(loc)) {
recent2.filter_badwords=false;
recent2.runOnce(marvin, 1000);
}
else if (RegExp('User:Lupin/Recent[_ ]IP[_ ]edits','i').test(loc)) {
recent2.filter_anonsOnly=true;
recent2.runOnce(marvin, 1000);
}
else if (RegExp('User:Lupin/Monitor[_ ]my[_ ]watchlist', 'i').test(loc)) {
recent2.filter_watchlist=true;
recent2.runOnce(marvin, 1000);
}
}
// adds a 'logs for this page' link to the navigation bar
// if the page is a user's page, talk page or subpage, the link will go to logs for the user instead
// if the page is a special page, then no link is displayed
$(function () {
// get page title
var pagetitleRe=/[^:]*:\/\/en\.wikipedia\.org\/(wiki\/|w\/index\.php\?title=)([^&?#]*)/;
ptitle = pagetitleRe.exec(decodeURI(location.href))[2].split('_').join(' ');
// if this is a user, show the logs for the user rather than the page
if( (window.location.href.indexOf("User:") != -1) || (window.location.href.indexOf("User_talk:") != -1) ) {
regDropSubpages = /[User|User_talk]:([^&?\/]*)[\/]?.*/;
user = regDropSubpages.exec(ptitle)[1];
url = "http://en.wikipedia.org/w/index.php?title=Special%3ALog&user=" + user;
} else if(window.location.href.indexOf("Special:") != -1) {
// don't display link for special pages
return;
} else {
url = "http://en.wikipedia.org/w/index.php?title=Special%3ALog&page=" + ptitle;
}
tabs = document.getElementById('p-tb').getElementsByTagName('ul')[0];
l = addlilink(tabs, url, "Logs", "pt-logs");
});
//
// inline style sheet to keep this whole thing self-contained:
document.write('<style type="text/css">' +
' .xdiff { width: 100%; background: white; }' +
' .xdiff-row { width: 100%; margin: 0 0 3px 0; overflow: hidden; }' +
' .xdiff-col { width: 49%; margin: 0; float: left; clear: none; position: relative; }' +
' .xdiff-sign, .xdiff-outer, .xdiff-inner { display: block; margin: 0; }' +
' .xdiff-sign { position: absolute; top: 0; left: 0; width: 2em; text-align: center; }' +
' .xdiff-outer { padding: 0 0 0 2em; }' +
' .xdiff-inner { overflow: auto; overflow-y: visible; width: 100%; }' +
' .xdiff-inner.diff-addedline { font-size: 85%; background: #cfc; }' +
' .xdiff-inner.diff-deletedline { font-size: 85%; background: #ffa; }' +
' .xdiff-inner.diff-context { font-size: 85%; background: #eee; }' +
(!document.recalc ? '' : // IE kluge:
' * html .xdiff-inner { padding-bottom: expression(this.scrollWidth > this.offsetWidth ? "16px" : 0); }' +
' * html .xdiff-sign { top: expression((this.parentNode.clientHeight - this.offsetHeight)/2 + "px"); }') +
'<'+'/style>');
//
// onload
$(maybeStart);
$(addMarvin);
/// Local Variables: ///
/// mode:c ///
/// fill-prefix:"// " ///
/// End: ///
$(function () {
var query_prefix = "title=Special:Watchlist&action=submit&remove=1&id[]=";
//var query_prefix = "action=unwatch&title=";
if (window.location.href.indexOf("Special:Watchlist") == -1) return;
var links = document.getElementById('content').getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
if (links[i].href.substring(links[i].href.length-15) != '&action=history')
continue;
var unwatch = document.createElement('a');
unwatch.href = "/w/index.php?" + query_prefix + encodeURIComponent(links[i].title);
unwatch.title = "Unwatch "+links[i].title;
unwatch.appendChild(document.createTextNode("unwatch"));
links[i].parentNode.insertBefore(unwatch, links[i].nextSibling);
// kluge to handle case where "diff" is unlinked:
var delim = links[i].previousSibling;
delim = (delim.nodeType == 3 ? delim.nodeValue : "");
links[i].parentNode.insertBefore(document.createTextNode(delim.replace(/^.*diff/, "")), unwatch);
}
});
//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'); }
/**************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
********************************************* VoA SCRIPTS START HERE **********************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
***************************************************************************************************************************
**************************************************************************************************************************/
// Admin rollback tools [[Category:VoA scripted admins|{{PAGENAME}}]]
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Specialadmin/monobook.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//
$(Dfn_js_con)
function Dfn_js_con()
{
//moves
Mvaluejs_class = 'm';
//edits
Rvaluejs_class = 'r';
//uploads
Uvaluejs_class = 'u';
}
//
// </nowiki></pre>
//<pre><nowiki>
//Helper tools
$(newlogcheck)
function newlogcheck()
{
if (document.title.indexOf("User creation log") != -1)
{
addTab("javascript:noedits()", "{{check for sleepers}}", "ca-sleepers", "Show inactive accounts", "");
addTab("javascript:autconedits()", "{autoconfirm range}", "ca-autocon", "Autoconfirm range", "");
addTab("http://en.wikipedia.org/w/index.php?title=Special:Log&type=newusers&user=&page=&limit=500&offset=25000", "(mid-range)", "ca-autocon", "Fairly new accounts", "");
addTab("http://en.wikipedia.org/w/index.php?title=Special:Log&type=newusers&user=&page=&limit=500&offset=50000", "(old range)", "ca-oldusers", "Older accounts", "");
}
else if (document.title.indexOf("New pages") != -1)
{
addTab("javascript:nootheredits()", "{{check editcounts}}", "ca-sleepers", "Show edit # for accounts", "");
}
else if (document.title.indexOf("User list") != -1)
{
addTab("javascript:checkinactive()", "{{check for inactives}}", "ca-inactives", "Show inactive accounts", "");
addTab("http://en.wikipedia.org/w/index.php?title=Special:Listusers&group=sysop&limit=5000", "(all sysops)", "ca-sysops", "Show sysops", "");
}
}
//Globals
NewUPcount = 0;
NewUPcount10 = 0;
zil = 0;
inactiveu = 0;
zilE = 0;
zilTOT = 0;
inactive_user_num = 0;
active_user_num = 0;
c_active_user_num = 0;
//
//
function autconedits()
{
var theURL = 'http://en.wikipedia.org/wiki/Special:Statistics';
gml_xmlhttp = HTTPClient();
if (!gml_xmlhttp)
{return;}
gml_xmlhttp.open("GET", theURL, true);
gml_xmlhttp.onreadystatechange = getxmlstats;
gml_xmlhttp.send(null);
}
function getxmlstats()
{
if (!gml_xmlhttp){return;}
if (gml_xmlhttp.readyState != 4)
{return;}
xml = gml_xmlhttp.responseText;
var number = xml.split('<a name="User_statistics"></a>')[1].split('<p>We have <b>')[1].split('</b> registered user accounts')[0];
number = number.replace(/,/g, '');
var offset_blocked = Math.round((1)*number/100)/1;
offset_not_blocked = offset_blocked + 1;
alert('Special:Statisics data retrieved.' + '\n' + number + ' user accounts have been created.' + '\n' + 'The newest 1% contains ' + offset_blocked + ' users.' + '\n' + 'Setting ' + offset_not_blocked + ' as the log page offset.');
location.href = 'http://en.wikipedia.org/w/index.php?title=Special:Log&type=newusers&user=&page=&limit=200&offset=' + offset_not_blocked;
}
//END
//
function checkinactive()
{
if (!document.getElementsByTagName('ol')[0])
{alert('There are no elements in this list.'); return;}
if (!document.getElementsByTagName('ol')[0].getElementsByTagName('li')[0])
{alert('There are no elements in this list.'); return;}
var ls = document.getElementsByTagName('ol')[0].getElementsByTagName('li');
if (ls[0].innerHTML.indexOf(' (active)') != -1 || ls[0].innerHTML.indexOf(' (inactive))') != -1)
{alert('Results already shown.'); return;}
alert("Checking for inactive accounts.");
consec_inactivecheck(0);
}
function consec_inactivecheck(inactiveu)
{
if (document.getElementsByTagName('ol')[0].getElementsByTagName('li')[inactiveu])
{
var name = document.getElementsByTagName('ol')[0].getElementsByTagName('li')[inactiveu].getElementsByTagName('a')[0].innerHTML;
var URL = 'http://en.wikipedia.org/w/index.php?title=Special:Contributions&limit=1&target=' + name + '&useskin=none';
inactiveconcheck_req(URL,inactiveu);
}
else
{
inactiveutot = document.getElementsByTagName('ol')[0].getElementsByTagName('li').length;
var editaverage = active_user_num/inactiveutot;
var ceditaverage = c_active_user_num/inactiveutot;
var ineditaverage = inactive_user_num/inactiveutot;
ceditaverage = 100*ceditaverage;
editaverage = 100*editaverage;
ineditaverage = 100*ineditaverage;
ceditaverage = Math.round((100)*ceditaverage)/100;
editaverage = Math.round((100)*editaverage)/100;
ineditaverage = Math.round((100)*ineditaverage)/100;
document.getElementById('bodyContent').innerHTML = '<strong><span style="color:darkblue;">Edit count completed:</span>' + '<br>' + Math.round((100)*editaverage)/100 + '% (' + active_user_num + ') <span style="color:darkblue;">of these users are active (last edited 29 days ago at most)</span><br>' + Math.round((100)*ceditaverage)/100 + '% (' + c_active_user_num + ') <span style="color:darkgreen;">of these users are currently active (last edited 3 days ago at most)</span><br>' + Math.round((100)*ineditaverage)/100 + '% (' + inactive_user_num + ') <span style="color:darkred;">of these users are long-term inactive (last edited 1+ years ago)</strong></span><br>' + document.getElementById('bodyContent').innerHTML;
}
}
function inactiveconcheck_req(URL,inactiveu)
{
gml_xmlhttp = HTTPClient();
gml_xmlhttp.open("GET", URL, true);
gml_xmlhttp.onreadystatechange = partial_inactivecheck;
gml_xmlhttp.send(null);
}
function partial_inactivecheck()
{
var Done=0;
if (gml_xmlhttp.readyState != 4)
{return;}
xml = gml_xmlhttp.responseText.split('<div id="p-cactions" class="portlet">')[0];
//Current time
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);
//UTC done
if (xml.indexOf('<li>') == -1)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += '<span style="color:red;"><strong> (error)</strong></span>';
Done=1;
}
if (Done == 0)
{
var yearloc = xml.split('<li>')[1].split('</li>')[0].split(' (<a href=')[0].split(' (<A href=')[0].split('(<a href=')[0].split('(<A href=')[0];
//li time
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];}
//difference
var lpoint = LTime.length - 5;
LTimenum = LTime.substring(lpoint);
LSimpletime = 1*(LTimenum.split(":")[0]);
var LTimeM = (LTimenum.split(":")[1]);
LTime = LSimpletime + (LTimeM/60);
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 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 Daylength = Math.round((1)*totdays)/1;
if (Daylength == 0)
{
Daylength = 1;
}
}
//
if (totdays < 4)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')</strong><span style="color:blue;"> (active)</span>';
c_active_user_num += 1;
active_user_num += 1;
}
else if (totdays > 728)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')<span style="color:red;"> (inactive -- 2+ years)</span></strong>';
inactive_user_num += 1;
}
else if (totdays > 364)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')</strong><span style="color:red;"> (inactive -- 1 year)</span>';
inactive_user_num += 1;
}
else if (totdays > 89)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')</strong><span style="color:darkred;"> (inactive -- 3-11 months)</span>';
}
else if (totdays > 59)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')</strong><span style="color:purple;"> (away -- ~2 months)</span>';
}
else if (totdays > 29)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')</strong><span style="color:darkorange;"> (away -- ~1 month)</span>';
}
else if (totdays > 3)
{
document.getElementsByTagName('li')[inactiveu].innerHTML += ' <strong>(</strong>last edit: <strong>' + yearloc + ')</strong><span style="color:green;"> (away)</span>';
active_user_num += 1;
}
}
inactiveu += 1;
consec_inactivecheck(inactiveu);
}
//END
//
function noedits()
{
if (document.getElementById('contentSub').innerHTML.indexOf('Checking for sleeper accounts (Be sure to have a good offset).') !=-1)
{alert('Results already shown.'); return;}
var ls = document.getElementsByTagName('ul')[0].getElementsByTagName('li');
if (ls[0].innerHTML.indexOf(' edit)</strong>') != -1 || ls[0].innerHTML.indexOf(' edits)</strong>') != -1)
{alert('Results already shown.'); return;}
document.getElementById('contentSub').innerHTML += "<br><strong>Checking for sleeper accounts (Be sure to have a good offset).</strong>";
consec_contribcheck(0);
}
function consec_contribcheck(zil)
{
if (document.getElementsByTagName('ul')[0].getElementsByTagName('li')[zil])
{
var URL = document.getElementsByTagName('ul')[0].getElementsByTagName('li')[zil].getElementsByTagName('a')[2].href;
URL += '&limit=1';
speep_req(URL,zil);
}
else
{
ziltot = zil-1;
var editaverage = Math.round((100)*zilE/ziltot)/100;
editaverage = 100*editaverage;
//get time frame
var lt = document.getElementsByTagName('li')[0].innerHTML.split(' <a href="')[0].split(' <A href="')[0];
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);
var lj = document.getElementsByTagName('li')[zil-1].innerHTML.split(' <a href="')[0].split(' <A href="')[0];
if (lj.indexOf('January ') != -1)
{var LMonth = 'January'; var LMval = 1; var LDay = lj.split('January ')[1].split(',')[0]; var LYear = lj.split('January ')[1].split(', ')[1]; var LTime = lj.split(', January ')[0];}
else if (lj.indexOf('February ') != -1)
{var LMonth = 'February'; var LMval = 2; var LDay = lj.split('February ')[1].split(',')[0]; var LYear = lj.split('February ')[1].split(', ')[1]; var LTime = lj.split(', February ')[0];}
else if (lj.indexOf('March ') != -1)
{var LMonth = 'March'; var LMval = 3; var LDay = lj.split('March ')[1].split(',')[0]; var LYear = lj.split('March ')[1].split(', ')[1]; var LTime = lj.split(', March ')[0];}
else if (lj.indexOf('April ') != -1)
{var LMonth = 'April'; var LMval = 4; var LDay = lj.split('April ')[1].split(',')[0]; var LYear = lj.split('April ')[1].split(', ')[1]; var LTime = lj.split(', April ')[0];}
else if (lj.indexOf('May ') != -1)
{var LMonth = 'May'; var LMval = 5; var LDay = lj.split('May ')[1].split(',')[0]; var LYear = lj.split('May ')[1].split(', ')[1]; var LTime = lj.split(', May ')[0];}
else if (lj.indexOf('June ') != -1)
{var LMonth = 'June'; var LMval = 6; var LDay = lj.split('June ')[1].split(',')[0]; var LYear = lj.split('June ')[1].split(', ')[1]; var LTime = lj.split(', June ')[0];}
else if (lj.indexOf('July ') != -1)
{var LMonth = 'July'; var LMval = 7; var LDay = lj.split('July ')[1].split(',')[0]; var LYear = lj.split('July ')[1].split(', ')[1]; var LTime = lj.split(', July ')[0];}
else if (lj.indexOf('August ') != -1)
{var LMonth = 'August'; var LMval = 8; var LDay = lj.split('August ')[1].split(',')[0]; var LYear = lj.split('August ')[1].split(', ')[1]; var LTime = lj.split(', August ')[0];}
else if (lj.indexOf('September ') != -1)
{var LMonth = 'September'; var LMval = 9; var LDay = lj.split('September ')[1].split(',')[0]; var LYear = lj.split('September ')[1].split(', ')[1]; var LTime = lj.split(', September ')[0];}
else if (lj.indexOf('October ') != -1)
{var LMonth = 'October'; var LMval = 10; var LDay = lj.split('October ')[1].split(',')[0]; var LYear = lj.split('October ')[1].split(', ')[1]; var LTime = lj.split(', October ')[0];}
else if (lj.indexOf('November ') != -1)
{var LMonth = 'November'; var LMval = 11; var LDay = lj.split('November ')[1].split(',')[0]; var LYear = lj.split('November ')[1].split(', ')[1]; var LTime = lj.split(', November ')[0];}
else if (lj.indexOf('December ') != -1)
{var LMonth = 'December'; var LMval = 12; var LDay = lj.split('December ')[1].split(',')[0]; var LYear = lj.split('December ')[1].split(', ')[1]; var LTime = lj.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 = ziltot;
Year = Year.split(' ')[0].split('</a>')[0];
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 caverage = E/totdays;
}
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 caverage = E/totdays;
}
//
document.getElementById('bodyContent').innerHTML = '<strong>' + editaverage + '%<span style="color:red;"> of these users have not made any edits.</span></strong>' + '<br>' + '<strong>' + Math.round((100)*caverage)/100 + ' accounts created per day (average).</strong>' + '<br>' + document.getElementById('bodyContent').innerHTML;
}
}
function speep_req(URL,zil)
{
gml_xmlhttp = HTTPClient();
//if (!gml_xmlhttp){setTimeout('consec_contribcheck(zil)',50);}
gml_xmlhttp.open("GET", URL, true);
gml_xmlhttp.onreadystatechange = two_editcheck;
gml_xmlhttp.send(null);
}
function two_editcheck()
{
if (!gml_xmlhttp){return;}
if (gml_xmlhttp.readyState != 4)
{return;}
xml = gml_xmlhttp.responseText;
if (xml.indexOf('d matching these criteria.') != -1)
{
document.getElementsByTagName('li')[zil].innerHTML += '<span style="color:red;"><strong>(No edits)</strong></span>';
zil+=1;
zilE+=1;
}
else if (xml.indexOf('d matching these criteria.') == -1)
{
document.getElementsByTagName('li')[zil].innerHTML += '<span style="color:blue;">(Some edits)</span>';
zil+=1;
}
consec_contribcheck(zil);
}
//END
//
function nootheredits()
{
if (document.getElementById('contentSub').innerHTML.indexOf('Checking for account activity levels for page authors.') !=-1)
{alert('Results already shown.'); return;}
var ls = document.getElementsByTagName('ol')[0].getElementsByTagName('li');
if (ls[0].innerHTML.indexOf(' edit)</strong>') != -1 || ls[0].innerHTML.indexOf(' edits)</strong>') != -1)
{alert('Results already shown.'); return;}
document.getElementById('contentSub').innerHTML += "<br><strong>Checking for account activity levels for page authors.</strong>";
consec_newcontribcheck(0);
}
function consec_newcontribcheck(NewUPcount)
{
if (document.getElementsByTagName('ol')[0].getElementsByTagName('li')[NewUPcount])
{
var URL = document.getElementsByTagName('ol')[0].getElementsByTagName('li')[NewUPcount].getElementsByTagName('a')[4].href;
URL += '&limit=10';
sconcheck_req(URL,NewUPcount);
}
else
{
NewUPcounttot = NewUPcount-1;
var countaverage = Math.round((100)*NewUPcount10/NewUPcounttot)/100;
countaverage = 100*countaverage;
//get time frame
var lt = document.getElementsByTagName('li')[0].innerHTML.split(' <a href="')[0].split(' <A href="')[0];
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);
var lj = document.getElementsByTagName('li')[NewUPcount-1].innerHTML.split(' <a href="')[0].split(' <A href="')[0];
if (lj.indexOf('January ') != -1)
{var LMonth = 'January'; var LMval = 1; var LDay = lj.split('January ')[1].split(',')[0]; var LYear = lj.split('January ')[1].split(', ')[1]; var LTime = lj.split(', January ')[0];}
else if (lj.indexOf('February ') != -1)
{var LMonth = 'February'; var LMval = 2; var LDay = lj.split('February ')[1].split(',')[0]; var LYear = lj.split('February ')[1].split(', ')[1]; var LTime = lj.split(', February ')[0];}
else if (lj.indexOf('March ') != -1)
{var LMonth = 'March'; var LMval = 3; var LDay = lj.split('March ')[1].split(',')[0]; var LYear = lj.split('March ')[1].split(', ')[1]; var LTime = lj.split(', March ')[0];}
else if (lj.indexOf('April ') != -1)
{var LMonth = 'April'; var LMval = 4; var LDay = lj.split('April ')[1].split(',')[0]; var LYear = lj.split('April ')[1].split(', ')[1]; var LTime = lj.split(', April ')[0];}
else if (lj.indexOf('May ') != -1)
{var LMonth = 'May'; var LMval = 5; var LDay = lj.split('May ')[1].split(',')[0]; var LYear = lj.split('May ')[1].split(', ')[1]; var LTime = lj.split(', May ')[0];}
else if (lj.indexOf('June ') != -1)
{var LMonth = 'June'; var LMval = 6; var LDay = lj.split('June ')[1].split(',')[0]; var LYear = lj.split('June ')[1].split(', ')[1]; var LTime = lj.split(', June ')[0];}
else if (lj.indexOf('July ') != -1)
{var LMonth = 'July'; var LMval = 7; var LDay = lj.split('July ')[1].split(',')[0]; var LYear = lj.split('July ')[1].split(', ')[1]; var LTime = lj.split(', July ')[0];}
else if (lj.indexOf('August ') != -1)
{var LMonth = 'August'; var LMval = 8; var LDay = lj.split('August ')[1].split(',')[0]; var LYear = lj.split('August ')[1].split(', ')[1]; var LTime = lj.split(', August ')[0];}
else if (lj.indexOf('September ') != -1)
{var LMonth = 'September'; var LMval = 9; var LDay = lj.split('September ')[1].split(',')[0]; var LYear = lj.split('September ')[1].split(', ')[1]; var LTime = lj.split(', September ')[0];}
else if (lj.indexOf('October ') != -1)
{var LMonth = 'October'; var LMval = 10; var LDay = lj.split('October ')[1].split(',')[0]; var LYear = lj.split('October ')[1].split(', ')[1]; var LTime = lj.split(', October ')[0];}
else if (lj.indexOf('November ') != -1)
{var LMonth = 'November'; var LMval = 11; var LDay = lj.split('November ')[1].split(',')[0]; var LYear = lj.split('November ')[1].split(', ')[1]; var LTime = lj.split(', November ')[0];}
else if (lj.indexOf('December ') != -1)
{var LMonth = 'December'; var LMval = 12; var LDay = lj.split('December ')[1].split(',')[0]; var LYear = lj.split('December ')[1].split(', ')[1]; var LTime = lj.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 = NewUPcounttot;
Year = Year.split(' ')[0].split('</a>')[0];
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 caverage = E/totdays;
}
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 caverage = E/totdays;
}
//
document.getElementById('bodyContent').innerHTML = '<strong>' + countaverage + '%<span style="color:darkblue;"> of these pages where made by users with 10+ edits.</span></strong>' + '<br>' + '<strong>' + Math.round((100)*caverage)/100 + ' pages created per day (average).</strong>' + '<br>' + document.getElementById('bodyContent').innerHTML;
document.getElementById('contentSub').innerHTML += "<br><strong><span style='color: blue'>Edit count completed.</span></strong>";
var body = document.getElementById('bodyContent');
body.ranSetupTooltipsAlready=false;
setupTooltips(body);
}
}
function sconcheck_req(URL,NewUPcount)
{
gml_xmlhttp = HTTPClient();
//if (!gml_xmlhttp){setTimeout('consec_newcontribcheck(NewUPcount)',50);}
gml_xmlhttp.open("GET", URL, true);
gml_xmlhttp.onreadystatechange = partial_editcheck;
gml_xmlhttp.send(null);
}
function partial_editcheck()
{
if (gml_xmlhttp.readyState != 4)
{return;}
xml = gml_xmlhttp.responseText.split('<div id="p-cactions" class="portlet">')[0];
if (xml.indexOf('<li>') == -1)
{
document.getElementsByTagName('li')[NewUPcount].innerHTML += '<span style="color:red;"><strong> (edits deleted)</strong></span>';
NewUPcount += 1;
}
if (xml.split('<li>').length-1 == 1)
{
document.getElementsByTagName('li')[NewUPcount].innerHTML += '<span style="color:red;"><strong> (1 edit)</strong></span>';
NewUPcount += 1;
}
else if (xml.split('<li>').length-1 > 1 && xml.split('<li>').length-1 < 5)
{
var num = xml.split('<li>').length - 1;
document.getElementsByTagName('li')[NewUPcount].innerHTML += '<span style="color:darkred;"><strong> (' + num + ' edits)</strong></span>';
NewUPcount += 1;
}
else if (xml.split('<li>').length-1 > 4 && xml.split('<li>').length-1 < 10)
{
var num = xml.split('<li>').length - 1;
document.getElementsByTagName('li')[NewUPcount].innerHTML += '<strong> (' + num + ' edits)</strong>';
NewUPcount += 1;
}
else if (xml.split('<li>').length-1 > 9)
{
document.getElementsByTagName('li')[NewUPcount].innerHTML += '<span style="color:blue;"> (10+ edits)</span>';
NewUPcount10 += 1;
NewUPcount += 1;
}
consec_newcontribcheck(NewUPcount);
}
//END
//block stuff
$(IPblock)
function IPblock()
{
if (document.title.indexOf('Block user') != -1 && document.getElementById('wpBlockExpiry'))
{
var option = document.getElementById('wpBlockOther').getElementsByTagName('input')[0];
option.value='indefinite';
}
}
//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;
}
//END sleeper stuff
//************
//</nowiki></pre>