MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 271: Line 271:
     if (window.location.pathname == '/w/Special:RecentChanges') $('#mw-site-navigation .sidebar-chunk a[href="/w/Special:RecentChanges"]').addClass('mw-has-selflink');
     if (window.location.pathname == '/w/Special:RecentChanges') $('#mw-site-navigation .sidebar-chunk a[href="/w/Special:RecentChanges"]').addClass('mw-has-selflink');
     $('#p-banner').html("<span><span class='main-accent'>El</span>wiki</span>");
     $('#p-banner').html("<span><span class='main-accent'>El</span>wiki</span>");
     $('table[cellpadding="5"][border="1"][style] tr, .segment-header:not(.job-change-collapsible .segment-header)').each(function () {
     $('table[cellpadding="5"][border="1"][style] tr, .segment-header:not(.job-change-collapsible .segment-header), .segment .mw-collapsible-text').each(function () {
         var rgb = $(this).css('backgroundColor');
         if ($(this).hasClass('.mw-collapsible-text')) {
            var rgb = $(this).parents('.segment').css('backgroundColor')
        } else {
            var rgb = $(this).css('backgroundColor');
        }
         var colors = rgb.match(/\d+/g);
         var colors = rgb.match(/\d+/g);
         var o = Math.round(((parseInt(colors[0]) * 299) + (parseInt(colors[1]) * 587) + (parseInt(colors[2]) * 114)) / 1000);
         var o = Math.round(((parseInt(colors[0]) * 299) + (parseInt(colors[1]) * 587) + (parseInt(colors[2]) * 114)) / 1000);