mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix srcset
This commit is contained in:
parent
68e455f927
commit
9662a0b127
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -495,10 +495,10 @@ class UserInfo extends NavbarComponent
|
||||
// face.setAttribute("src", faceUrl);
|
||||
const faceBaseSize = 68;
|
||||
const dpis = [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4];
|
||||
face.setAttribute("srcset", dpis.reduce((acc, dpi) =>
|
||||
face.setAttribute("srcset", dpis.map(dpi =>
|
||||
{
|
||||
return acc + `, ${faceUrl}@${parseInt(faceBaseSize * dpi)}w_${parseInt(faceBaseSize * dpi)}h.jpg ${dpi}x`;
|
||||
}, ""));
|
||||
return `${faceUrl}@${parseInt(faceBaseSize * dpi)}w_${parseInt(faceBaseSize * dpi)}h.jpg ${dpi}x`;
|
||||
}).join(","));
|
||||
// face.style.backgroundImage = `url('${userInfo.face}@68w_68h.jpg')`;
|
||||
if (userInfo.pendant.image)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user