1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

3.5.377. Rewrite bits emoticon handling to support the new multiple prefixes code. Add an option to disable loyalty badges. Fix default sub badges not rendering.

This commit is contained in:
SirStendec 2016-11-21 20:36:17 -05:00
parent 9345237327
commit caa68c507c
8 changed files with 142 additions and 51 deletions

View file

@ -1050,10 +1050,12 @@ module.exports = FFZ.utils = {
room_badge_css: function(room_id, badge_id, version, data) {
var img_1x = data.image_url_1x,
img_2x = data.image_url_2x,
img_4x = data.image_url_4x;
img_4x = data.image_url_4x,
return '.from-display-preview[data-room="' + room_id + '"] .badge.' + badge_id + '.version-' + version +
',.chat-line[data-room="' + room_id + '"] .badge.' + badge_id + '.version-' + version + '{' +
loyalty = version === Infinity;
return (loyalty ? '.ffz-no-loyalty ' : '') + '.from-display-preview[data-room="' + room_id + '"] .badge.' + badge_id + (loyalty ? '' : '.version-' + version) +
(loyalty ? ',.ffz-no-loyalty ' : ',') + '.chat-line[data-room="' + room_id + '"] .badge.' + badge_id + (loyalty ? '' : '.version-' + version) + '{' +
'background-image:url("' + img_1x + '");' +
'background-image:' + WEBKIT + 'image-set(url("' + img_1x + '") 1x' + (img_2x ? ',url("' + img_2x + '") 2x' : '') + (img_4x ? ',url("' + img_4x + '") 4x' : '') + ')}';
},