Skip to content

Commit

Permalink
Fix: Added .webp Support to Nhentai
Browse files Browse the repository at this point in the history
Added to Nhentai's model.ts extension map
  • Loading branch information
Eliolocin committed Nov 10, 2024
1 parent 1e892c5 commit 2c8f204
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sites/NHentai/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const extensionMap: any = {
j: "jpg",
p: "png",
g: "gif",
w: "webp",
};

function makeGallery(gallery: any): IImage {
Expand All @@ -15,7 +16,8 @@ function makeImage(image: any): IImage {
.replace("https://t.", "https://i.")
.replace(/t.jpg$/, ".jpg")
.replace(/t.png$/, ".png")
.replace(/t.gif$/, ".gif");
.replace(/t.gif$/, ".gif")
.replace(/t.webp$/, ".webp");
return image;
}

Expand Down

0 comments on commit 2c8f204

Please sign in to comment.