This commit is contained in:
c
2025-03-12 20:11:03 +08:00
commit 70b7c82c97
1178 changed files with 148185 additions and 0 deletions
@@ -0,0 +1,15 @@
export function generateCoverURL (url, cropRule) {
if (!url || !cropRule) return url
const parsedUrl = new URL(url)
if (parsedUrl.pathname.endsWith('.webp')) {
return url
}
const isQuery = parsedUrl.search.length > 0
const separator = isQuery ? '&' : '?'
return url + separator + cropRule
}