User:Kxx/vector.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
(function() {
    var window = this, document = window.document, head = document.head, mw = window.mw, $ = window.$, importScript = function(src, async) {
        var script = document.createElement('script');
        script.src = mw.config.get('wgScript') + '?title=' + src + '&action=raw&ctype=text/javascript';
        script.async = !!async;
        head.appendChild(script);
    }, MathJax = window.MathJax;
    window.insertBanner = function() {};
    importScript('User:Kxx/fix_images.js', true);
    $('.smallcaps, .SMALLCAPS').addClass('smcp');
    $('img[srcset]').removeAttr('srcset');
    if (MathJax) {
        MathJax.Hub.Config({
            'HTML-CSS': {
                webFont: 'TeX'
            }
        });
        MathJax.OutputJax.fontDir = '//cdn.mathjax.org/mathjax/latest/fonts';
    }
    $(function() {
        $(window).trigger('resize');
    });
})();