Skip to content

Commit 06c2c5c

Browse files
committed
👍 Gyazoをサムネイル画像にするときは/rawで終わるURLを用いる
1 parent 7db13ad commit 06c2c5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

browser/websocket/makeChanges.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ function findLinksAndImage(text: string): [string[], string | null] {
8686
}
8787
case "image":
8888
case "strongImage": {
89-
image ??= node.src;
89+
image ??= node.src.endsWith("/thumb/1000")
90+
? node.src.replace(/\/thumb\/1000$/, "/raw")
91+
: node.src;
9092
return;
9193
}
9294
case "strong":

0 commit comments

Comments
 (0)