ElEditors, Interface administrators, Administrators
70,857
edits
No edit summary |
No edit summary |
||
Line 293: | Line 293: | ||
genSetRandDARTNumber(); | genSetRandDARTNumber(); | ||
function matchHeaderText( | function matchHeaderText() { | ||
$('table[cellpadding="5"][border="1"][style] tr[style]:not(.dungeon-page-fields tr), . | $('table[cellpadding="5"][border="1"][style] tr[style]:not(.dungeon-page-fields tr), .instance-page .segment-header, .auto-header-color .segment-header').each(function () { | ||
var rgb = $(this).css('backgroundColor'); | var rgb = $(this).css('backgroundColor'); | ||
var colors = rgb.match(/\d+/g); | var colors = rgb.match(/\d+/g); | ||
Line 300: | Line 300: | ||
if ($(this).parents('.section-characters').length) return; | if ($(this).parents('.section-characters').length) return; | ||
if (o < 155 && rgb != 'rgba(0, 0, 0, 0)') { | if (o < 155 && rgb != 'rgba(0, 0, 0, 0)') { | ||
$(this).addClass('force-white | $(this).addClass('force-white'); | ||
} else | } else { | ||
$(this).addClass('force-black | $(this).addClass('force-black'); | ||
} | } | ||
}); | }); | ||
setTimeout(function () { | setTimeout(function () { | ||
$('.segment-partial .mw-collapsible-text, .segment .mw-collapsible-text').each(function () { | $('.segment-partial .mw-collapsible-text, .segment .mw-collapsible-text').each(function () { | ||
var | var matched_white = $(this).parents('.segment').find('.segment-header:eq(0)').hasClass('force-white'); | ||
var | var matched_black = $(this).parents('.segment').find('.segment-header:eq(0)').hasClass('force-black'); | ||
$(this). | if (matched_white) { | ||
$(this).addClass('force-white') | |||
} else if (matched_black) { | |||
$(this).addClass('force-black') | |||
} | |||
}); | }); | ||
}, 50); | }, 50); |