The code makes the background of the topic title header like the color of the groups
this code work fit with the ModernBB
I want to modify it to be fit with the AwesomeBB version
this code work fit with the ModernBB
- Code:
/* -- 00. group_color -- */
$(function() {
for (var a = $('.post'), i = 0, j = a.length, color, rgb, title; i < j; i++) {
color = $('.postprofile dt .user-name span[style*="color"]', a[i])[0];
if (color) {
title = $('.post-head', a[i]);
color = color.style.color;
rgb = color.replace(/rgb\(|\)|\s/g, '').split(',');
rgb = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000) > 125 ? '#000' : '#FFF';
title.css({
color : rgb,
background : color
});
$('a', title[0]).attr('style', 'color:' + rgb + ' !important;');
}
}
});
I want to modify it to be fit with the AwesomeBB version
Last edited by DaRk Kn!GhT on April 17th 2024, 4:27 am; edited 1 time in total