Медијавики:Vector.js — разлика између измена
Извор: Викимедијина заједница Републике Српске
(Нова страница: →Any JavaScript here will be loaded for users using the Vector skin: //to be able to switch the language variant (overrides the default buttons with more visible o…) |
(Нема разлике)
|
Текућа измена од 19. јун 2015. у 21:59
/* Any JavaScript here will be loaded for users using the Vector skin */ //to be able to switch the language variant (overrides the default buttons with more visible ones) function tabWorkaround() { if(mw.config.get('wgUserVariant') == 'sr') { var tab_urls = {}; tab_urls[0] = document.getElementById('ca-0').getElementsByTagName('a')[0].href; //Ћирилица tab_urls[1] = document.getElementById('ca-1').getElementsByTagName('a')[0].href; //Latinica $('#p-variants').remove(); mw.util.addPortletLink('p-namespaces', tab_urls[0], 'Ћирилица'); mw.util.addPortletLink('p-namespaces', tab_urls[1], 'Latinica'); } } $(document).ready(tabWorkaround);