User:Bryanston/global.js

var hasClass = ( function {	var reCache = {};	return function( element, className ) {		return ( reCache[className] ? reCache[className] : ( reCache[className] = new RegExp( "(?:\\s|^)" + className + "(?:\\s|$)" ) ) ).test( element.className );	}; }); importScriptPage('HideRail/code.js', 'dev'); importScriptPage('MediaWiki:RailgunClient.min.js', 'railgunscript'); importScriptPage('WHAM/code.js', 'dev'); importScriptPage('AjaxRC/code.js', 'dev'); importScriptPage('PurgeButton/code.js', 'dev'); importScriptPage('InactiveUsers/code.js', 'dev'); importScriptPage('BackToTopButton/code.js', 'dev'); importScriptPage('SkinSwitchButton/code.js', 'dev'); importArticles({   type: 'script',    articles: [        'u:wikimarks:Client.js'    ] }); importArticles({   type: "script",    articles: [        "w:c:dev:RevealAnonIP/usercode.js"    ] }); //Advanced Tools importScriptPage('QuickTools/advanced.js', 'dev'); importArticles( {   type: 'script',    articles: [        // ...        'u:dev:CapsFirst/code.js',        // ...    ] } ); importArticles({   type: "script",    articles: [        "u:dev:ListFiles/code.js" // ListFiles from Dev Wiki    ] }); // Не могу в скрипты поэтому скопирую код с удалением одного элемента // $(document).ready(function { var badgesTpl = document.getElementById('badges'); if ((typeof badgesTpl !== "undefined") && (badgesTpl !== null)) { $("#badges").addClass("module"); $('#WikiaRail').prepend(badgesTpl); } });

// Adds an EditCount tab to the user namespace $(function {   var username = wgTitle.indexOf("Contributions/") != -1 ? wgTitle.replace("Contributions/", "") : wgTitle;    $('.tabs-container > ul.tabs').append('Editcount'); }); // END Adds an EditCount tab to the user namespace

// 05:53, January 26, 2012 (UTC) //

function addWikifButton { var toolbar = document.getElementById('toolbar') if (!toolbar) return var i = document.createElement('img') i.src = 'http://upload.wikimedia.org/wikisource/ru/d/d1/Button-wikifikator.png' i.alt = i.title = 'викификатор' i.onclick = Wikify i.style.cursor = 'pointer' toolbar.appendChild(i) } if (wgAction == 'edit' || wgAction == 'submit') { importScriptURI('http://ru.wikipedia.org/w/index.php?title=MediaWiki:Wikificator.js&action=raw&ctype=text/javascript') addOnloadHook(addWikifButton) } var refreshDate; function showTime { var   now = new Date, hh = now.getHours, mm = now.getMinutes, ss = now.getSeconds, time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss ); $('#showdate').empty.append(' ' + time + ' '); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(showTime, 1000); } $(document).ready(function {   if (skin == 'oasis')         $(' ').appendTo('#AccountNavigation');    else        $('#p-personal ul').prepend(' ');    showTime;    refreshDate = window.setTimeout(showTime, 1000);    $('#displayTimer').css({ color: '#FFF', fontWeight: 'normal', fontSize: '10px', letterSpacing: '2px', marginLeft: '3px' }) });