MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 315: Line 315:
     $('.region-map img[alt="About this image"]').attr('src', 'https://elwiki.net/wiki/images/1/1f/UI_-_Help.png').show();
     $('.region-map img[alt="About this image"]').attr('src', 'https://elwiki.net/wiki/images/1/1f/UI_-_Help.png').show();
     $('table[cellpadding="5"][border="1"][style] tr[style*="rgb(68, 68, 68)"] th').css('border-color', 'black')
     $('table[cellpadding="5"][border="1"][style] tr[style*="rgb(68, 68, 68)"] th').css('border-color', 'black')
    $('[data-type="table-row"]').each(function () {
        var cell = $(this).find('[data-type="table-cell"]');
        var count_in_row = cell.length / 2;
        if (count_in_row > 4) {
            var overflow_elems = cell.slice(8, count_in_row * 2);
            if ($(this).next().attr('data-type') != 'table-row') $(this).after('<div data-type="table-row">');
            $(this).next().append(overflow_elems);
        }
    });


});
});
Line 348: Line 358:
         var link = $(this).find('.skill-wrap > .skill-wrap-text a:not(.image)').attr('href');
         var link = $(this).find('.skill-wrap > .skill-wrap-text a:not(.image)').attr('href');
         if (link.length) window.location.href = link;
         if (link.length) window.location.href = link;
    });
    $('[data-type="table-row"]').each(function () {
        var cell = $(this).find('[data-type="table-cell"]');
        var count_in_row = cell.length / 2;
        if (count_in_row > 4) {
            var overflow_elems = cell.slice(8, count_in_row * 2);
            if ($(this).next().attr('data-type') != 'table-row') $(this).after('<div data-type="table-row">');
            $(this).next().append(overflow_elems);
        }
     });
     });