User:.jun/global.js

document.getElementsByClassName('wds-global-navigation__search-input')[0].addEventListener('blur', function(elem) {   if (!elem.srcElement.value) {        document.getElementById('globalNavigation').classList.remove('wds-search-is-active');    } });

if (mw.config.get('wgCanonicalSpecialPageName') == 'Recentchanges') { Array.prototype.forEach.call(document.getElementsByClassName('rc-conntent')[0].querySelectorAll('a'), function(elem) {       if (elem.getAttribute('href') !== '#') {            elem.setAttribute('target', '_blank');        }    }); } window.ajaxCallAgain = window.ajaxCallAgain || []; window.ajaxCallAgain.push(function {   Array.prototype.forEach.call(document.getElementsByClassName('rc-conntent')[0].querySelectorAll('a'), function(elem) { if (elem.getAttribute('href') !== '#') { elem.setAttribute('target', '_blank'); }   }); }); window.ajaxPages = ['Special:RecentChanges', 'Special:WikiActivity'], window.ajaxRefresh = 30000;

Array.prototype.forEach.call(document.querySelectorAll('a[data-canonical="wikiactivity"]'), function(elem) {   elem.href = '/wiki/Special:Recentchanges';    elem.innerHTML = 'Recent changes'; });

var persistentParameterList = ['useskin', 'uselang', 'usesitecss', 'usesitejs', 'useusercss', 'useuserjs', 'usevector'];

mw.util.addCSS(   '#source-code, #source-toc {' +        'font-family: monaco, monospace !important;' +    '}' +    '#source-code > a {' +        'color: ' + window.getComputedStyle(document.getElementsByTagName('a')[0]).color + ' !important;' +        'font-weight: bold;' +    '}' );

importArticles({   type: 'script',    articles: [        'u:dev:AjaxRC/code.js',        'u:dev:PersistentParameters/code.js',        'u:dev:LastEdited/code.js',        'u:dev:QuickDiff/code.js',        'u:dev:View_Source/code.js'    ] });