User:Reo On/monobook.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. |
The accompanying .css page for this skin is at User:Reo On/monobook.css. |
/* </pre> */
// --------- custom edit toolbar ---------
// Adresa buttonů - http://commons.wikimedia.org/wiki/Category:ButtonToolbar
//http://upload.wikimedia.org/wikipedia/commons/e/eb/Button_templatelink.png {T} button
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_template_alt.png",
"speedTip": "{{}}",
"tagOpen": "{{",
"tagClose": "}}",
"sampleText": "Insert text"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1c/Button_advanced_image.png",
"speedTip": "obrázek s parametry",
"tagOpen": "[[",
"tagClose": "||||]]",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5e/Nuvola-inspired_Edit_Bar_for_MediaWik-button_sig.png",
"speedTip": "Comment",
"tagOpen": "<!--",
"tagClose": "-->",
"sampleText": " --KOMENTÁŘ-- "};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/7a/Button_ip_partag%C3%A9e.png",
"speedTip": "Wel}}",come",
"tagOpen": "\x7B{Subst:W-all
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/ca/EXPBT3-o.png",
"speedTip": "MYKO Pah",
"tagOpen": "\x7B{subst:Test3b}}",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/bd/Warn4.png",
"speedTip": "imidiate warning",
"tagOpen": "\x7B{subst:Test4im-alt}}",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d1/Puls_da_aiutare.png",
"speedTip": "Conflict of interest",
"tagOpen": "\x7B{subst:uw-coi|",
"tagClose": "}}",
"sampleText": "Article"};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/b/bb/Seealso.png",
"speedTip": "READ it",
"tagOpen": "Please <font color=red><span style=text-decoration: blink>READ</span></font> the link I provided in my edit",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/4a/Button_welcome.png",
"speedTip": "welcome - constructive",
"tagOpen": "[[Image:Information.svg|left|25px|alt=|link=]] Welcome to Wikipedia. Everyone is welcome to make constructive contributions to Wikipedia, but at least one of your recent edits, such as the one you made to [[:XXX]], did not appear to be constructive and has been ''' [[Help:Reverting|reverted]]''' (undone) by [[User:Reo On|Reo]] (me). :: Please use [[Wikipedia:Sandbox|the sandbox]] for any test edits you would like to make, and take a look at the [[Wikipedia:Introduction|welcome page]] to learn more about contributing to this encyclopedia. Note that human editors do monitor recent changes to Wikipedia articles, and [[WP:ADMINS|administrators]] have the ability to [[WP:BLOCK|block]] users from editing if they repeatedly engage in [[WP:vandalism|vandalism]]. :: The following is the log entry regarding this warning: [[XXX]] was [XXX changed] by [[Special:Contributions/IPIP|IPIP]] [[User talk:IPIP|(t)]]. Thank you. Have a nice time with Wikipedia! x7E\x7E\x7E\x7E.",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/71/TableCell.png",
"speedTip": "|rour|",
"tagOpen": "|",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png",
"speedTip": "PODPIS", // předpokládám, že .... ;-)
"tagOpen": "\x7E\x7E\x7E\x7E",
"tagClose": "",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "<ref></ref>",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": ""};
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "https://upload.wikimedia.org/wikipedia/commons/f/f7/Button_referencesR.png",
"speedTip": "<references />",
"tagOpen": "<references />",
"tagClose": "",
"sampleText": ""};
};
// [[User:Lupin/popups.js]]
mw.loader.load(
'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
//From http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510
function addSinceTab() {
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if (window.location.href.indexOf("&action=history&gotosince=true")!=-1) {
do_since_I_last_edited()
}
else if (!/wiki\/Special:|w\/index.php?title=Special:/.test(window.location.href)) {
var thetitle=document.title.slice(0, String(document.title).indexOf(" - "));
var l=addlilink(tabs, "/w/index.php?title="+thetitle+"&action=history&gotosince=true", 'Changes since I last edited', '');
l.lastChild.title="Changes since I last edited";
}
}
function do_since_I_last_edited() {
var csub=document.getElementById("contentSub");
var msg=document.createElement("p");
msg.appendChild(document.createTextNode
("Parsing history... please wait..."));
msg.className="error";
csub.insertBefore(msg, csub.firstChild)
var username=document.getElementById("pt-userpage").textContent;
var hists=document.getElementById("pagehistory").getElementsByTagName('li');
for (n=0;n<hists.length;n++) {
if (hists[n].getElementsByTagName("span")[0].getElementsByTagName('a')[0].textContent==username) {
document.location=hists[n].childNodes[1].href;
return;
}
}
msg.replaceChild(document.createTextNode
("You have not edited this page! (recently)"),
msg.firstChild);
}
$(addSinceTab);
//Variables pro nastavení drop down menu na stránkách, přidávám tab na zkratky
var cactions = {
svars: Array(
['New pages', mw.config.get('wgScript')+'?title=Special:NewPages&action=view'],
['User talk templates', mw.config.get('wgScript')+'?title=Wikipedia:Template_messages/User_talk_namespace&action=view'],
['AIV reports', mw.config.get('wgScript')+'?title=Wikipedia:Administrator_intervention_against_vandalism&action=view'],
['Speedy deletion', mw.config.get('wgScript')+'?title=Wikipedia:Criteria_for_speedy_deletion&action=view']
['edit my js', mw.config.get('wgScript')+'?title=User:Reo_On/monobook.js=view']
)
};
//This function ([[User:Dr pda/prosesize.js]]) adds a link to the toolbox which, when clicked, displays the size of the page
//and the size of the prose. See the talk page for more details.
importScript('User:Dr pda/prosesize.js'); //[[User:Dr pda/prosesize.js]]
//BOOKMARKS from User:Alex Smotrov
importScript('user:js/popupBookmarks.js')
//More stuff at [[Wikipedia:WikiProject User scripts/Scripts]]
importScript('User:AzaToth/twinkle.js');
TwinkleConfig = {
revertMaxRevisions : 50,
userTalkPageMode : 'tab',
showSharedIPNotice : true,
openTalkPage : [ 'agf', 'norm', 'vand' ],
openTalkPageOnAutoRevert : false,
summaryAd : " using [[WP:TWINKLE|TW]]",
deletionSummaryAd : " using [[WP:TWINKLE|TW]]",
protectionSummaryAd : " using [[WP:TWINKLE|TW]]",
watchSpeedyPages : [ ],
watchProdPages : false,
openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
watchRevertedPages : [ ],
markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ],
deleteTalkPageOnDelete : false,
watchWarnings : false,
markAIVReportAsMinor : true,
markSpeedyPagesAsMinor : true,
offerReasonOnNormalRevert : true,
orphanBacklinksOnSpeedyDelete : {orphan:true, exclude:['g6']}
};
FriendlyConfig = {
summaryAd : " using [[WP:FRIENDLY|Friendly]]",
topWelcomes : false,
enableClock : false,
watchWelcomes : false,
markWelcomesAsMinor : true,
insertHeadings : true,
welcomeHeading : "== Welcome ==",
insertUsername : true,
insertSignature : true,
quickWelcomeMode : "auto",
quickWelcomeTemplate : "Welcome",
markSharedAsMinor : true,
groupByDefault : true,
watchTaggedPages : false,
markTaggedPagesAsMinor : true
};
importScript('User:AWeenieMan/furme.js');
importScript("User:Smith609/toolbox.js");
importScript("User:Rjd0060/PermissionOTRS.js");
importScript("User:Rjd0060/OTRS-Text.js");
importScript("User:Rjd0060/OTRS.js");
importScript('User:Mr.Z-man/closeAFD.js');
importScript('User:Mr.Z-man/hideClosedAFD.js');
importScript('User:Doug/closemfd.js');
importScript('User:Lifebaka/closedrv.js');
importScript('User:Tra/sidebartranslate.js');
importScript('User:Ais523/votesymbols.js');
importScript('User:Dr_pda/prosesize.js');
// [[User:Steel359/protection.js]]
importScript('User:Steel359/protection.js');
importScript("User:Animum/easyblock.js"); //[[User:Animum/easyblock.js]]
// [[User:Krimpet/CH2.js]]
importScript('User:Krimpet/CH2.js');
mw.loader.load('https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');
importScript('User:Quarl/util.js');
importScript('User:Quarl/wikipage.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('Wikipedia:WikiProject Deletion sorting/delsort.js');
//pro posouzení délky strany; nr of characters
importScript('User:Dr pda/prosesize.js'); //[[User:Dr pda/prosesize.js]]
///How to customise WikiLove? - http://www.mediawiki.org/wiki/WikiLove#How_to_customize
//see in history - reverted (it disrupted my edit tools)
/////////////////////////////////////////////////////
//////////////////////////////////
// [[User:Essjay]]'s monobook. //
//////////////////////////////////
// Please note: There are sysop, bureaucrat, and checkuser function settings in this skin. //
// They appear under tabs with the associated names (syop, bcrat, check). //
// They will not work if you do not have the required permissions. //
// Do not be alarmed if you get error messages. //
// (They can easily be removed, ask me.) //
/**** Initialize on window load ****/
$( myLoadFuncs );
/**** Load custom functions ****/
function myLoadFuncs()
{
if(!document.getElementById) return;
// add a clock
var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0];
addlilink(toplinks, '#', '', 'utcdate');
showtime();
morelinks();
}
/**** Add generic tab ****/
function addlilink(tabs, url, name, id){
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.id = id;
li.appendChild(na);
tabs.appendChild(li);
return li;
}
//////////////////////////////////////////
// Tabs by Korath
// returns <li><a href="url">name</a></li>
//////////////////////////////////////////
/**** Add tab as menu ****/
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');
li.id = id;
li.className = 'tabmenu';
li.appendChild(na);
li.appendChild(mn);
tabs.appendChild(li);
return li;
}
/**** Get a clock that autoupdates! ****/
function showtime()
{
var timerID;
var now = new Date();
var timeValue = now.toUTCString().replace(/GMT/, "UTC");
document.getElementById('utcdate').firstChild.innerHTML = timeValue;
timerID = setTimeout('showtime()', 100);
}
function addTab(url, name, id, title, key){
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
addlilink(tabs, url, name, id, title, key);
}
// Adds a "blocklog" tab and fills in the username field on Special:Blockip, if a "&faketarget=username" is present.
function do_blockip_stuff()
{
// focus on Reason field
document.getElementsByName('wpBlockReason')[0].focus();
// Look for a &faketarget= for the username/ip
var l = location.search.substring(1).split('&');
var target = '';
for (var i = 0; i < l.length; ++i)
{
var n = l[i].indexOf('=');
if (l[i].substring(0, n) == 'faketarget')
{
target = l[i].substring(n + 1);
break;
}
}
if (target == '')
return;
// put account name in "IP Address/username" field
var addr = document.getElementsByName('wpBlockAddress')[0];
addr.value = unescape(target);
// add "blocklog" tab
var c1 = document.getElementById('column-one');
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
tabs.appendChild(addlilink('/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A' + target, 'blocklog'));
}
// Opens the block log in the current window, and Special:Blockip in a popup.
// Width, height, top, and left are chosen for a 1600x1200 display.
//function blockpage_and_log(target)
//{
// window.open('Special_Blockip.html?foo=blarg&faketarget=' + target, 'Block', 'width=1600,height=600,top=600,left=0');
// document.location.href = 'http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A' + target;
//}
// Adds "block" and "blocklog" tabs to User: and User talk: pages.
function add_block_tab(){
var c1 = document.getElementById('column-one');
var tabs = document.getElementById('p-cactions').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 "block" tab
addTab('/wiki/Special:Blockip/' + editlk, 'block', 'ca-block');
// add "blocklog" tab
addTab('/wiki/Special:Log/block?page=User:' + editlk, 'log', 'ca-blocklog');
// add "unblock" tab
addTab('/w/index.php?title=Special:Ipblocklist&action=unblock&ip=' + editlk, 'un');
// add "contributions" tab
addTab('/wiki/Special:Contributions/' + editlk, 'con');
// add "edit count" tab
addTab('http://countervandalism.org/Count.php?username=' + editlk, 'count');
// add "whois" tab
addTab('http://tools.wikimedia.de/~essjay/nqt.php?queryType=arin&target=' + editlk, 'who');
// add "proxycheck" tab
addTab('http://www.checker.freeproxy.ru/checker/?proxy=' + editlk + ':80%0D%0A' + editlk + ':8080%0D%0A' + editlk + ':3182%0D%0A' + editlk + ':1080%0D%0A' + editlk + ':4232%0D%0A' + editlk + ':3380%0D%0A' + editlk + ':14321%0D%0A' + editlk + ':14441%0D%0A' + editlk + ':15551%0D%0A' + editlk + ':17771%0D%0A' + editlk + ':18844%0D%0A' + editlk + ':19991%0D%0A' + editlk + ':28882%0D%0A' + editlk + ':29992%0D%0A' + editlk + ':31121%0D%0A' + editlk + ':38883%0D%0A' + editlk + ':38884%0D%0A' + editlk + ':3800%0D%0A' + editlk + ':8081%0D%0A' + editlk + ':3124%0D%0A' + editlk + ':3127%0D%0A' + editlk + ':3128%0D%0A' + editlk + ':6588%0D%0A' + editlk + ':7212%0D%0A' + editlk + ':8000%0D%0A' + editlk + ':8888', 'proxy');
}
function morelinks()
{
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
if(document.title.indexOf("User") == 0)
{
addlimenu(tabs, 'User', 'userf');
var userf = document.getElementById('userf').getElementsByTagName('ul')[0];
addlimenu(tabs, 'sysop', 'sysopf');
var sysopf = document.getElementById('sysopf').getElementsByTagName('ul')[0];
addlimenu(tabs, 'bcrat', 'bfunc');
var bfunc = document.getElementById('bfunc').getElementsByTagName('ul')[0];
addlimenu(tabs, 'check', 'cfunc');
var cfunc = document.getElementById('cfunc').getElementsByTagName('ul')[0];
//User functions //
var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
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);
// format: addlilink(userf, url, name);
// add "listusers" tab
addlilink(userf, '/w/index.php?title=Special:Listusers&group=&username=' + editlk, 'list', '');
// add "contributions" tab
addlilink(userf, '/wiki/Special:Contributions/' + editlk, 'contrib', '');
// addTab('/wiki/Special:Contributions/' + editlk, 'con');
// add "userspace" tab
addlilink(userf, '/w/index.php?title=Special:Prefixindex&namespace=2&from=' + editlk, 'space', '');
// add "edit count" tab
addlilink(userf, 'http://countervandalism.org/Count.php?username=' + editlk, 'count', '');
// addTab('http://countervandalism.org/Count.php?username=' + editlk, 'count');
// add "whois" tab
addlilink(userf, 'http://tools.wikimedia.de/~essjay/nqt.php?queryType=arin&target=' + editlk, 'whois', '');
// addTab('http://tools.wikimedia.de/~essjay/nqt.php?queryType=arin&target=' + editlk, 'who');
// add "proxycheck" tab
addlilink(userf, 'http://www.checker.freeproxy.ru/checker/?proxy=' + editlk + ':80%0D%0A' + editlk + ':8080%0D%0A' + editlk + ':3182%0D%0A' + editlk + ':1080%0D%0A' + editlk + ':4232%0D%0A' + editlk + ':3380%0D%0A' + editlk + ':14321%0D%0A' + editlk + ':14441%0D%0A' + editlk + ':15551%0D%0A' + editlk + ':17771%0D%0A' + editlk + ':18844%0D%0A' + editlk + ':19991%0D%0A' + editlk + ':28882%0D%0A' + editlk + ':29992%0D%0A' + editlk + ':31121%0D%0A' + editlk + ':38883%0D%0A' + editlk + ':38884%0D%0A' + editlk + ':3800%0D%0A' + editlk + ':8081%0D%0A' + editlk + ':3124%0D%0A' + editlk + ':3127%0D%0A' + editlk + ':3128%0D%0A' + editlk + ':6588%0D%0A' + editlk + ':7212%0D%0A' + editlk + ':8000%0D%0A' + editlk + ':8888', 'proxy', '');
// addTab('http://www.checker.freeproxy.ru/checker/?proxy=' + editlk + ':80%0D%0A' + editlk + ':8080%0D%0A' + editlk + ':3182%0D%0A' + editlk + ':1080%0D%0A' + editlk + ':4232%0D%0A' + editlk + ':3380%0D%0A' + editlk + ':14321%0D%0A' + editlk + ':14441%0D%0A' + editlk + ':15551%0D%0A' + editlk + ':17771%0D%0A' + editlk + ':18844%0D%0A' + editlk + ':19991%0D%0A' + editlk + ':28882%0D%0A' + editlk + ':29992%0D%0A' + editlk + ':31121%0D%0A' + editlk + ':38883%0D%0A' + editlk + ':38884%0D%0A' + editlk + ':3800%0D%0A' + editlk + ':8081%0D%0A' + editlk + ':3124%0D%0A' + editlk + ':3127%0D%0A' + editlk + ':3128%0D%0A' + editlk + ':6588%0D%0A' + editlk + ':7212%0D%0A' + editlk + ':8000%0D%0A' + editlk + ':8888', 'proxy');
// add "url" tab
addlilink(userf, 'http://' + editlk, 'url', '');
// addTab('http://' + editlk, 'url');
// add a "Yahoo" tab
addlilink(userf, 'http://search.yahoo.com/search?x=op&va_vt=any&va=' + editlk, 'Yahoo', '');
// addTab('http://search.yahoo.com/search?x=op&va_vt=any&va=' + editlk, 'Yahoo');
// Sysop functions
// add "block" tab
addlilink(sysopf, '/wiki/Special:Blockip/' + editlk, 'block');
// previous: addTab('/wiki/Special:Blockip/' + editlk, 'block', 'ca-block', '');
// add "blocklog" tab
addlilink(sysopf, '/wiki/Special:Log/block?page=User:' + editlk, 'log', '');
// addTab('/wiki/Special:Log/block?page=User:' + editlk, 'log', 'ca-blocklog');
// add "unblock" tab
addlilink(sysopf, '/w/index.php?title=Special:Ipblocklist&action=unblock&ip=' + editlk, 'unblock', '');
// addTab('/w/index.php?title=Special:Ipblocklist&action=unblock&ip=' + editlk, 'un');
// add "view deleted edits" tab
addlilink(sysopf, 'http://tools.wikimedia.de/~interiot/cgi-bin/queries/tmp/del?user=' + editlk + '&dbname=enwiki', 'deleted', '');
// Bureaucrat functions
// add "makesysop" tab
addlilink(bfunc, 'http://en.wikipedia.org/w/index.php?title=Special%3AMakesysop&wpMakesysopUser=' + editlk, 'sysop', '');
// add "rename" tab
addlilink(bfunc, 'http://en.wikipedia.org/w/index.php?title=Special%3ARenameuser&oldusername=' + editlk, 'rename', '');
// add "makebot" tab
addlilink(bfunc, 'http://en.wikipedia.org/w/index.php?title=Special%3AMakebot&username=' + editlk, 'bot', '');
//Checkuser functions
// add "checkuser" tab
addlilink(cfunc, 'http://en.wikipedia.org/w/index.php?title=Special:CheckUser&user=' + editlk, 'user', '');
// add "checkip" tab
addlilink(cfunc, 'http://en.wikipedia.org/w/index.php?title=Special:CheckUser&ip=' + editlk, 'ip', '');
// add "log" tab
addlilink(cfunc, 'http://en.wikipedia.org/w/index.php?title=Special:CheckUser&log=1', 'log', '');
}
}
function do_onload()
{
if (document.title.indexOf('Block user') == 0) // could stand to be more robust
do_blockip_stuff();
}
// Do useful thinks on Special:Log/newusers //
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 inc (file) {
mw.loader.load('/w/index.php?title='+file+'&action=raw&ctype=text/javascript&dontcountme=s');
}
inc("User:Topaz/init.js");
inc("User:Topaz/util.js");
inc("User:Topaz/comm.js");
inc("User:Topaz/wputil.js");
inc("User:Reo_On/statuschanger.js");
//Interiot's Java //
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript');
// Unwatch Links //
$(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") < 0) return;
if (window.location.href.indexOf("Special:Watchlist/edit") >= 0) 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);
}
});
//Death to editing on redlinks //
function stopRedlinksEditing(){
var len=document.links.length;
for(var i=0; i<len; ++i) {
var l=document.links[i];
if (l.className=='new') {
l.href=l.href.replace('&action=edit', '');
}
}
}
addOnloadHook(stopRedlinksEditing);
//BCrats stuff//
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Reo_On/bureaucrat.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//Checkuser reporting//
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Reo_On/checkuser.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//Rename results//
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Reo_On/rename.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//Personal toolbox//
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Reo_On/personaltoolbox.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//Mediation results//
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Reo_On/mediation.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/*
//Autodelete with Jude's delete tool//
$(function (){
if(queryString("submitdelete")=="true") document.forms[0].wpConfirmB.click();
});
function queryString(p) {
var re = RegExp('[&?]' + p + '=([^&]*)');
var matches;
if (matches = re.exec(document.location)) {
try {
return decodeURI(matches[1]);
} catch (e) {
}
}
return null;
};
*/
// Always uncheck "block anons only" on Special:Blockip //
// Another success from User:Lupin //
$(function(){ var x; if (x=document.getElementById('wpAnonOnly')) {x.checked=false;} });
$(function(){ var x; if (x=document.getElementById('wpCreateAccount')) {x.checked=false;} });
// Always uncheck "move user's pagse" on Special:Renameuser //
$(function(){ var x; if (x=document.getElementById('movepages')) {x.checked=false;} });
// </nowiki></pre> //
////SHAREBOX - rearanging the toolbox to include social networking
importScript('User:TheDJ/sharebox.js');
document.write("\<script");
document.write(" src='http://images.wikia.com/central/suggest/suggest.js'");
document.write("\>");
document.write("\</script\>");
importScript( 'User:Pediapress/collection.js' );