MediaWiki:Common.js: відмінності між версіями

нема опису редагування
Немає опису редагування
Немає опису редагування
Рядок 288: Рядок 288:
                             $content.data('loaded', true);
                             $content.data('loaded', true);


                             var $table = $content.find('table.sortable, table.wikitable').first();
                             // Let DOM render completely before processing
                            $table.tablesorter();
                            setTimeout(function () {
                            applyWinrateColors($content);
                                var $table = $content.find('table').first();
                            applyRolePills($content);
                                if ($table.length) {
                            wrapWideTables($content);
                                    $table.addClass('wikitable sortable');
                            injectGamesFilters($content, $table);
                                    try { $table.tablesorter(); } catch(e) {}
                            $(document).trigger('mcc:content-loaded');
                                }
                                applyWinrateColors($content);
                                applyRolePills($content);
                                wrapWideTables($content);
                                injectGamesFilters($content, $table);
                                $(document).trigger('mcc:content-loaded');
                            }, 50);
                         },
                         },
                         error: function () {
                         error: function () {
Рядок 529: Рядок 535:
     applySeasonColors();
     applySeasonColors();
     $(document).on('mcc:content-loaded', function () { applySeasonColors(); });
     $(document).on('mcc:content-loaded', function () { applySeasonColors(); });
});
// ============================================================
// 13b. DYNAMIC R-BOX TOP — відступ під реальну висоту header
// ============================================================
$(function () {
    function setRboxTop() {
        var h = $('.header-container.header-chrome').outerHeight() || 56;
        $('.r-box, .tournament-box, .series-box').css('top', h + 'px');
    }
    setRboxTop();
    $(window).on('resize', setRboxTop);
});
});