This is an old revision of this page, as edited by 49TL (talk | contribs) at 19:08, 2 August 2006 (test). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 19:08, 2 August 2006 by 49TL (talk | contribs) (test)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)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> */ //////////////////////////////////////////////////////////////////////////// // ]'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 document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/search/?title=User:Voice_of_All/Addtabs/monobook.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // 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 = ; } else if(key) { ta = ; } else if(title) { ta = ; } } // 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'); addlilink(tb, url, name, id); } // function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul'); 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.className=="firstHeading") return z.textContent; }; } // Get's the URL version of the page title. function get_tidy_title() { var editlk = document.getElementById('ca-edit').getElementsByTagName('a').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'); if(after) { tabs.insertBefore(li,document.getElementById(after)); } else { tabs.appendChild(li); } if(id) { if(key && title) { ta = ; } else if(key) { ta = ; } else if(title) { ta = ;} } // 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').getElementsByTagName('ul'); // use the "edit this page" tab to get already-tidied url var editlk = document.getElementById('ca-edit').getElementsByTagName('a').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, '/search/?title=Special:Ipblocklist&action=unblock&ip=' + editlk, 'un'); // add "block" tab addlilink(tabs, '/search/?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, '/search/?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/search/?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 = 'Delete'; afdh_shortcuts = 'Keep'; afdh_shortcuts = 'Merge'; afdh_shortcuts = 'Move'; afdh_shortcuts = 'Redirect'; afdh_shortcuts = 'Rewrite'; afdh_shortcuts = 'Transwiki'; afdh_shortcuts = 'Weak delete'; afdh_shortcuts = 'Strong delete'; afdh_shortcuts = 'Speedy delete'; afdh_shortcuts = 'Strong keep'; afdh_shortcuts = 'Weak keep'; afdh_shortcuts = 'Comment'; afdh_icons = Array(); afdh_icons = afdh_icons = afdh_icons = afdh_icons = 'Symbol delete vote.svg'; afdh_icons = afdh_icons = afdh_icons = 'Symbol keep vote.svg'; afdh_icons = 'Symbol merge vote.svg'; afdh_icons = 'Symbol comment vote.svg'; afdh_commscs = Array(); afdh_commscs = '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 = oldanchors; } var url_re = /\?title=Misplaced Pages:Articles_for_deletion\/(+)&action=edit&/; var url, matches; for (var i=0; i < anchors.length; i++) { if (!(matches = anchors.href.match(url_re)) || (matches.substr(0, 4) == 'Log/')) continue; var na = document.createElement('a'); na.href = "javascript:afd_vote('"+escape(anchors.href)+"')"; na.title = "Vote on deletion of "+unescape(matches); var inlink = document.createElement('sup'); inlink.appendChild(document.createTextNode('vote')); na.appendChild(inlink); anchors.parentNode.insertBefore(na, anchors.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 + '; '; var vote = window.prompt("Enter your vote. (Shortcuts available are: "+shortcuts_list+")"); if (!vote) return; var icon_link = ''; if (afdh_useicons && afdh_icons) icon_link = ' + '|20px]] '; if (afdh_shortcuts) vote = afdh_shortcuts; shortcuts_list = ''; for (var key in afdh_commscs) shortcuts_list += key + ': ' + afdh_commscs + '; '; var comment = window.prompt("Enter your comment. (Shortcuts available are: "+shortcuts_list+")"); if (typeof comment != 'string') return; if (afdh_commscs) comment = afdh_commscs; 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 ]'), 'afdhn1'); window.open(am_make_url('Misplaced Pages:Articles for deletion/Log/'+log_date, '', '{{'+'subst:afd3|pg='+title+'}}', 'Nominating ] for deletion'), 'afdhn3'); window.location.href = am_make_url('Misplaced Pages:Articles for deletion/'+title, '', '{{'+'subst:afd2|pg='+title+'|text='+reason+' '+afdh_signature+'}}', 'nominated for deletion'); } addOnloadHook(afd_helper); addOnloadHook(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>]</td><td><big>' +"'''I'm " + status + "!'''" + '<br style="clear:both;"> </big><span class="plainlinks"></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.className.indexOf("vfd") != -1 || divs.className.indexOf("afd") != -1) divs.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.className.indexOf("vfd") != -1 || divs.className.indexOf("afd") != -1) divs.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 = ; 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.href + '§ion=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); document.getElementById('p-cactions').children.insertBefore(y,x.nextSibling); } else { z.href = x.childNodes.href + '§ion=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); document.getElementById('p-cactions').childNodes.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.className=="firstHeading") return z.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 = '+)&action=delete.*$/, '$1').replace(/_/g, ' ')).replace(/^(Talk|Misplaced Pages( 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'); f.value = msg; var j = document.getElementsByName('wpBlockOther'); j.value = other; } function unblockuser(msg, other) { var f = document.getElementsByName('wpUnblockReason'); 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'); 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'); 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'); 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'); f.value = "CSD" + " I" + page + ""; } function deleteo(number) { var page = prompt("What is the page name?") var f = document.getElementsByName('wpReason'); f.value = "]"; } function deletey(number) { var f = document.getElementsByName('wpReason'); 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 = "+]"; } 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').getElementsByTagName('ul'); // 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'); 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/bv}} ~~~", "vandalism warning (bv)", true, 1)',"b-vandal"); 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"); } if (document.title.indexOf("Editing User:") != -1) { addlimenu(tabs, 'userpage tags', 'talkm'); var talkm = document.getElementById('talkm').getElementsByTagName('ul'); addlilink(talkm,'javascript:edit_summary_watch("{{subst:ibu}}", "blocked tag", true, 1)',"ibu"); addlilink(talkm,'javascript:edit_summary_watch("{{WoW}}", "WoW tag", true, 1)',"WoW"); addlilink(talkm,'javascript:edit_summary_watch("{{WiC}}", "WiC tag", true, 1)',"WiC"); } 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 Misplaced Pages:Administrator intervention against vandalism (section)") == 0) { addlilink(tabs, 'javascript:testr(1)',"blocked - empty"); } if (document.title.indexOf("Editing Misplaced Pages:Administrator intervention against vandalism (section)") == 0) { addlilink(tabs, 'javascript:testt(1)',"blocked - not empty"); } if (document.title.indexOf("Editing Misplaced Pages: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 Misplaced Pages:Articles for deletion/Log") == 0) { addlilink(tabs, 'javascript:list(1)',"list"); } // if (document.title.indexOf("Misplaced Pages: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")', "..."); addlilink(tabs, 'javascript:blockuser("imposter, created solely to impersonate or attack an established user", "indefinite")', "imposter"); 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 Misplaced Pages: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'); tabs.appendChild(li); } function strip_namespace(target) { var colon = target.indexOf(':'); if (colon != -1) { var spaces = new Array('User', 'Misplaced Pages', '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 || ns == spaces + '_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.indexOf('='); var name = l.substring(0, eq); if (name == 'fakeaction') action = l.substring(eq + 1); else if (name == 'faketarget') target = unescape(l.substring(eq + 1)).replace(/_/g, ' '); } } if (action == 'afdlist') { document.editform.wpTextbox1.value += '{{' + 'subst:afd3|pg=' + target + '}}\n'; document.editform.wpSummary.value = ']'; } 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 ]).'); } 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.className == sClass ) a2.push( a ); return a2; } var a, td = GetByClass( 'td', 'diff-otitle' ); if ( ( td = td ) && ( a = td.getElementsByTagName( 'a' ) ) ) 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/search/?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' ).style.textTransform = 'none'; // UserMenu.insertBefore( 'pt-esp', 'pt-vandal', 'Status', 'http://en.wikipedia.org/search/?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 ) // 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/search/?title=User:' + userName + '/monobook.js&action=edit' ); NavMenu.append( 'n-' + x++, 'monobook.css', 'http://en.wikipedia.org/search/?title=User:' + userName + '/monobook.css&action=edit' ); NavMenu.append( 'n-' + x++, 'AfDs to be closed', 'http://en.wikipedia.org/Wikipedia:Articles_for_deletion/Old' ); NavMenu.append( 'n-' + x++, 'Todays AfDs', 'http://en.wikipedia.org/Wikipedia:Articles_for_deletion/Log/Today' ); NavMenu.append( 'n-' + x++, 'Speedy deletions', 'http://en.wikipedia.org/CAT:CSD' ); NavMenu.append( 'n-' + x++, 'RfA and RfB', 'http://en.wikipedia.org/WP:RFA' ); NavMenu.append( 'n-' + x++, 'Helpme', 'http://en.wikipedia.org/Category:Wikipedians looking for help' ); NavMenu.append( 'n-' + x++, 'Unblock', 'http://en.wikipedia.org/Category:Requests for unblock' ); NavMenu.append( 'n-' + x++, 'New users', 'http://en.wikipedia.org/search/?title=Special:Log&type=newusers&user=&page=&limit=20&offset=0' ); NavMenu.append( 'n- ' + x++, 'Purge', 'http://en.wikipedia.org/search/?title=' + getPname() + '&action=purge' ); } function PortletMenu( id ) // constructor { this.menu = document.getElementById( id ); this.list = this.menu.getElementsByTagName( 'ul' ); // 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.id ] = LIs; } 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 = 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 ); } // the ByTagName here is a bit annoying, but in Safari, I was picking // up TextNodes by using this.firstChild.firstChild // this.getText = function( id ) { return this.getElementsByTagName( 'a' ).firstChild.data } this.setText = function( id, txt ) { this.getElementsByTagName( 'a' ).firstChild.data = txt } this.getHref = function( id ) { return this.getElementsByTagName( 'a' ).href } this.setHref = function( id, url ) { this.getElementsByTagName( 'a' ).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.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' ).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; links = item.getElementsByTagName( 'a' ); user = links; name = user.firstChild.nodeValue; talk = links; talk.firstChild.nodeValue = 'talk'; // lowercase 'Talk' for consistency contribs = links; 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', '/search/?title=Special%3ALog&user=' + name, true, '#000088' ), insertLoc ); item.insertBefore( document.createTextNode( ', ' ), insertLoc ); item.insertBefore( NewLink( 'blocks', '/search/?title=Special%3ALog&type=block&page=User%3A' + name, true, '#008800' ), insertLoc ); item.insertBefore( document.createTextNode( ', ' ), insertLoc ); item.insertBefore( NewLink( 'is blocked?', '/Special:Ipblocklist?action=search&ip=' + name, true, '#888800' ), insertLoc ); item.insertBefore( document.createTextNode( ', ' ), insertLoc ); item.insertBefore( NewLink( 'do block!', '/search/?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.href + '§ion=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); document.getElementById('p-cactions').children.insertBefore(y,x.nextSibling); }else{ z.href = x.childNodes.href + '§ion=0'; z.appendChild(document.createTextNode('0')); y.appendChild(z); document.getElementById('p-cactions').childNodes.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/search/?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; 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 .*?>.*?(()\\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/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.indexOf('<li><input type="checkbox" name="id" value=') > -1) { var article=lines.replace(/.*title="(.*?)">.*/, '$1'); watchlist=true; } } window.watchlist=watchlist; } recent2.runOnce=function(f, time) { var i=recent2.runOnce.timers.length; var ff = function () { clearInterval(recent2.runOnce.timers); f() }; var timer=setInterval(ff, time); recent2.runOnce.timers.push(timer); } recent2.runOnce.timers=; var feed='http://en.wikipedia.org/search/?title=Special:Recentchanges&feed=rss'; window.newOutputDiv=function(klass, position, immortal) { var h1=document.getElementsByTagName('h1'); 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|2|1||)\\.){3}(25|2|1||)'); 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,'pubDate')); if (timestamp <= processRecentChanges.lastDate) continue; latest = (timestamp > latest) ? timestamp : latest; var diffText=getFirstTagContent(items,'description').split('</tr>').join('</tr>\n'); var editSummary=diffText.replace(RegExp('^<p>(.*?)</p>*'), '$1'); var editor=getFirstTagContent(items, 'creator') || getFirstTagContent(items, 'dc:creator'); if (recent2.filter_anonsOnly && !recent2.ipUserRegex.test(editor)) continue; var articleTitle=getFirstTagContent(items, 'title'); if (! recent2.show_talkpages && articleTitle && /^Talk:|^*?talk:/.test(articleTitle)) continue; if (recent2.filter_watchlist && articleTitle && ! window.watchlisttalk:/, ':')]) continue; if (recent2.filter_badwords) { var badMatch=null; if (window.vandals > 0) badMatch=']; 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, 'link'); articleTitle=getFirstTagContent(items, 'title'); var id=processRecentChanges.id; // highlighting badMatch=badMatch.split(badMatch).join('<span style="background-color: #FF6">'+badMatch+'</span>'); output.push(recent2.doLine({timestamp: timestamp, article:article, articleTitle:articleTitle, editor:editor, id:id, badWord:badMatch, badDiffFragment:badMatch, diff:diffText, summary:editSummary})); processRecentChanges.id++; } } else { var article=getFirstTagContent(items, 'link'); var articleTitle=getFirstTagContent(items, '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; } } 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 || !outputDivs.id) continue; if (outputDivs.id >= 0 && outputDivs.id < cur) { // FIXME BUG: if we go from the bottom up, then we'll delete one too many or too few, or something :-) outputDivs.parentNode.removeChild(outputDivs); outputDivs=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.className=='sysop_edit_line') divs.style.display= ( toggleSysopEdits.hidden ? 'none' : 'inline' ); } toggleSysopEdits.hidden = ! toggleSysopEdits.hidden; } window.bundles={}; window.vandalColour = function(vandal) { var num=window.vandals; 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.innerHTML==action + ' details' && document.links.href.indexOf('javascript:') == 0) { ++count; eval(document.links.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/'; 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 > 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>' + ' ' + '<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=bundle; } window.bundles=z; } window.vandals={} window.tryRollback=function(id) { var b=window.bundles; var vandal=b.editor; if (window.vandals==null) window.vandals=1; else window.vandals++; 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="(/search/*?action=rollback*?from=(*)*?)".*?<br />(<span*>)?(.*?)(</span>)?<br /></td>'); // match: useless // match: url (escaped) // match: last editor (escaped) // match: 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.split('+').join(' '); var lastSummary=match; // 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.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; 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=; for (var i=0; i<nums.length; ++i) if (nums<10) nums='0'+nums; 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; 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) ) { 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 = ; else if(key) ta = ; else if(title) ta = ; } // 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'); recent2.addlilink(tb, url, name, id); } window.addMarvin=function() { recent2.addToolboxLink('http://en.wikipedia.org/User:Lupin/Filter_recent_changes', 'Filter recent changes', 'toolbox_filter_changes'); recent2.addToolboxLink('http://en.wikipedia.org/User:Lupin/All_recent_changes', 'All recent changes', 'toolbox_all_changes'); recent2.addToolboxLink('http://en.wikipedia.org/User:Lupin/Recent_IP_edits', 'Recent IP edits', 'toolbox_IP_edits'); recent2.addToolboxLink('http://en.wikipedia.org/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/Filterrecentchanges','i').test(loc)) { recent2.filter_badwords=true; recent2.runOnce(marvin, 1000); } else if (RegExp('User:Lupin/Allrecentchanges','i').test(loc)) { recent2.filter_badwords=false; recent2.runOnce(marvin, 1000); } else if (RegExp('User:Lupin/RecentIPedits','i').test(loc)) { recent2.filter_anonsOnly=true; recent2.runOnce(marvin, 1000); } else if (RegExp('User:Lupin/Monitormywatchlist', '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 addOnloadHook(function () { // get page title var pagetitleRe=/*:\/\/en\.wikipedia\.org\/(wiki\/|w\/index\.php\?title=)(*)/; ptitle = pagetitleRe.exec(decodeURI(location.href)).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 = regDropSubpages.exec(ptitle); url = "http://en.wikipedia.org/search/?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/search/?title=Special%3ALog&page=" + ptitle; } tabs = document.getElementById('p-tb').getElementsByTagName('ul'); 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 addOnloadHook(maybeStart); addOnloadHook(addMarvin); /// Local Variables: /// /// mode:c /// /// fill-prefix:"// " /// /// End: /// addOnloadHook(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.href.substring(links.href.length-15) != '&action=history') continue; var unwatch = document.createElement('a'); unwatch.href = "/search/?" + query_prefix + encodeURIComponent(links.title); unwatch.title = "Unwatch "+links.title; unwatch.appendChild(document.createTextNode("unwatch")); links.parentNode.insertBefore(unwatch, links.nextSibling); // kluge to handle case where "diff" is unlinked: var delim = links.previousSibling; delim = (delim.nodeType == 3 ? delim.nodeValue : ""); links.parentNode.insertBefore(document.createTextNode(delim.replace(/^.*diff/, "")), unwatch); } }); //Interiot's javascript edit counter if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) { document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/search/?title=User:Interiot/Tool2/code.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); } /************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** ********************************************* VoA SCRIPTS START HERE ********************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** *************************************************************************************************************************** **************************************************************************************************************************/ // Admin rollback tools ] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/search/?title=User:Voice_of_All/Specialadmin/monobook.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // //moves Mvaluejsadmin = 'm'; //edits Rvaluejsadmin = 'r'; //uploads Uvaluejsadmin = 'u'; // </nowiki></pre>