User:Vitaly Verkash/vector-2022.js

// Custom JavaScript for highlighting favorites languages // Should be implemented in settings for every language var prefLangs = ["en", "ru", "sv"]; var prefClasses = $.map(prefLangs, function(lang) { return '.interwiki-' + lang; }); var prefElems = $(prefClasses.join(', ')); prefElems.parent.prepend(" ").prepend(prefElems);

var highlitLangs = ["en", "ru", "sv"]; var highlitClasses = $.map(highlitLangs, function(lang) { return '.interwiki-' + lang; }); var highlitElems = $(highlitClasses.join(', ')); highlitElems.css('font-weight', 'bold');

// deletes links eg [2] var paras = document.getElementsByClassName('reference'); while(paras[0]) { paras[0].parentNode.removeChild(paras[0]); }