feat: support gyazo thumbnail

This commit is contained in:
Shusui MOYATANI
2023-03-07 21:01:47 +09:00
parent 06baf0f154
commit e2cb527fcf

View File

@@ -12,6 +12,9 @@ const fixUrl = (url: URL): string => {
const imageId = match[1];
result.pathname = `${imageId}l.webp`;
}
} else if (url.host === 'i.gyazo.com') {
result.host = 'thumb.gyazo.com';
result.pathname = `/thumb/640_w${url.pathname}`;
}
return result.toString();
};