forked from Shinonome/dots-hyprland
booru: fix pixiv source link
This commit is contained in:
@@ -14,7 +14,7 @@ const APISERVICES = {
|
|||||||
|
|
||||||
const getWorkingImageSauce = (url) => {
|
const getWorkingImageSauce = (url) => {
|
||||||
if (url.includes('pximg.net')) {
|
if (url.includes('pximg.net')) {
|
||||||
return `https://www.pixiv.net/en/artworks/${url.substring(url.lastIndexOf('/')).replace(/_p\d+\.png$/, '')}`;
|
return `https://www.pixiv.net/en/artworks/${url.substring(url.lastIndexOf('/') + 1).replace(/_p\d+\.(png|jpg|jpeg|gif)$/, '')}`;
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user