mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Auto remove leading dot in image extension
This commit is contained in:
parent
71a5ca703b
commit
742eb05d6b
@ -154,6 +154,9 @@ const formatDuration = (time, fixed = 0) => {
|
||||
}
|
||||
const getDpiSourceSet = (src, baseSize, extension = 'jpg') => {
|
||||
const dpis = [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4]
|
||||
if (extension.startsWith('.')) {
|
||||
extension = extension.substring(1)
|
||||
}
|
||||
return dpis.map(dpi => {
|
||||
if (typeof baseSize === 'object') {
|
||||
if ('width' in baseSize && 'height' in baseSize) {
|
||||
|
||||
@ -154,6 +154,9 @@ const formatDuration = (time, fixed = 0) => {
|
||||
}
|
||||
const getDpiSourceSet = (src, baseSize, extension = 'jpg') => {
|
||||
const dpis = [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4]
|
||||
if (extension.startsWith('.')) {
|
||||
extension = extension.substring(1)
|
||||
}
|
||||
return dpis.map(dpi => {
|
||||
if (typeof baseSize === 'object') {
|
||||
if ('width' in baseSize && 'height' in baseSize) {
|
||||
|
||||
@ -153,6 +153,9 @@ const formatDuration = (time, fixed = 0) => {
|
||||
}
|
||||
const getDpiSourceSet = (src, baseSize, extension = 'jpg') => {
|
||||
const dpis = [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4]
|
||||
if (extension.startsWith('.')) {
|
||||
extension = extension.substring(1)
|
||||
}
|
||||
return dpis.map(dpi => {
|
||||
if (typeof baseSize === 'object') {
|
||||
if ('width' in baseSize && 'height' in baseSize) {
|
||||
|
||||
@ -153,6 +153,9 @@ const formatDuration = (time, fixed = 0) => {
|
||||
}
|
||||
const getDpiSourceSet = (src, baseSize, extension = 'jpg') => {
|
||||
const dpis = [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4]
|
||||
if (extension.startsWith('.')) {
|
||||
extension = extension.substring(1)
|
||||
}
|
||||
return dpis.map(dpi => {
|
||||
if (typeof baseSize === 'object') {
|
||||
if ('width' in baseSize && 'height' in baseSize) {
|
||||
|
||||
@ -117,6 +117,9 @@ export const formatDuration = (time, fixed = 0) => {
|
||||
}
|
||||
export const getDpiSourceSet = (src, baseSize, extension = 'jpg') => {
|
||||
const dpis = [1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4]
|
||||
if (extension.startsWith('.')) {
|
||||
extension = extension.substring(1)
|
||||
}
|
||||
return dpis.map(dpi => {
|
||||
if (typeof baseSize === 'object') {
|
||||
if ('width' in baseSize && 'height' in baseSize) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user