User:TRJ-VoRoN/global.js

window.gnWikiLinks = ['//ru.wizard-of-legend.wikia.com|Визарды', '//ru.the-forest.wikia.com|Форест', '//ru.dead-cells.wikia.com|Клетки', '//ru.bindingofisaac.wikia.com|Исаак']; $(function {    var $menu = $('.wds-global-navigation__link-group .wds-list'),        links = window.gnWikiLinks || [];    if (!$menu.length || !links.length) return;    links.forEach(function (v) { var link = v.replace(/\[|\]/g, ''), $a = $('', {               href: (/(.*?)\||$/.exec(link) || {})[1] || link,                text: (/\|(.*)/.exec(link) || {})[1] || link,                title: link        }); $menu.prepend($('').append($a)); }); });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:WantedPagesFilter/code.js',    ] });

importArticles({   type: 'script',    articles: [        // ...        'u:dev:MediaWiki:RailWAM/code.js'    ] });

importArticles({   type: 'script',    articles: [        'u:dev:RevealAnonIP/usercode.js',    ] });

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:ToggleSideBar/code.js',    ] });

/*global mw */ $(function {    'use strict';

if ($('#ca-lang-qqx').length) { return; }

var elem = mw.html, qstring = (window.location.search) ? '&' : '?',       $qqx = elem.element('li', {id: 'ca-lang-qqx'}, new elem.Raw( elem.element('a', {                   href: (window.location.href).replace(/#.*/, '') + qstring + 'debug=1',                    title: 'See all system messages on this page ',                }, (window.qqxText || 'Debug')))); if (mw.config.get('skin') === 'oasis') { $(window.WikiaBar.wikiaBarWrapperObj.find('.tools')).append($qqx); } else { $('#p-cactions > .pBody > ul').append($qqx); }

}); //

/*global mw */ $(function {    'use strict';

if ($('#ca-lang-qqx2').length) { return; }

var elem = mw.html, qstring = (window.location.search) ? '&' : '?',       $qqx2 = elem.element('li', {id: 'ca-lang-qqx2'}, new elem.Raw( elem.element('a', {                   href: (window.location.href).replace(/#.*/, '') + qstring + 'action=purge',                    title: 'See all system messages on this page ',                }, (window.qqx2Text || 'Cache')))); if (mw.config.get('skin') === 'oasis') { $(window.WikiaBar.wikiaBarWrapperObj.find('.tools')).append($qqx2); } else { $('#p-cactions > .pBody > ul').append($qqx2); }

}); //

!function( mw, $ ) { if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' )) === -1 ) return; $( ' ', {       id: 'linkParser',        style: 'float: right; margin-bottom: 5px;',        text: 'Parse',        type: 'button'    }) .insertAfter( '.wpSummary_canMinorEdit' ) .on( 'click', function {       var text = $( '#wpTextbox1' ).val,            new_text = text;        $.each( text.match( /(%[A-Za-z0-9]{2}){1,}/g ), function( i, v ) { try { new_text = new_text.replace( v, decodeURIComponent( v ) ); } catch( e ) { console.log( 'There was error ( ' + e + ' ) during attempt to parse this: ' + v ); }       });        $( '#wpTextbox1' ).val( new_text );    }); }( mediaWiki, jQuery );