mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-05 18:48:31 +00:00
Allow data.image
rather than data.urls
in generateOverrideCSS
for badges.
This commit is contained in:
parent
5d53dd7071
commit
aee458badd
1 changed files with 5 additions and 3 deletions
|
@ -52,9 +52,11 @@ const NO_REPEAT = 'background-repeat:no-repeat;background-position:center;',
|
|||
};
|
||||
|
||||
|
||||
export function generateOverrideCSS(data, style, is_dark) {
|
||||
let image = `url("${data.urls[1]}")`,
|
||||
image_set = `${WEBKIT}image-set(${image} 1x${data.urls[2] ? `, url("${data.urls[2]}") 2x` : ''}${data.urls[4] ? `, url("${data.urls[4]}") 4x` : ''})`;
|
||||
export function generateOverrideCSS(data, style) {
|
||||
const urls = data.urls || {1: data.image};
|
||||
|
||||
let image = `url("${urls[1]}")`,
|
||||
image_set = `${WEBKIT}image-set(${image} 1x${urls[2] ? `, url("${urls[2]}") 2x` : ''}${urls[4] ? `, url("${urls[4]}") 4x` : ''})`;
|
||||
|
||||
if ( style === 3 || style === 4 )
|
||||
return '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue