mp4 gallery comments
This commit is contained in:
parent
5047952935
commit
9fa22e5200
|
@ -3,8 +3,8 @@ export const proxyURL = (url: string): string =>
|
||||||
|
|
||||||
export const linkify = (content: string) =>
|
export const linkify = (content: string) =>
|
||||||
content.replace(
|
content.replace(
|
||||||
/https?:\/\/[^.]*\.imgur.com\/([\/_a-zA-Z0-9-]+)\.gifv/g,
|
/https?:\/\/[^.]*\.imgur.com\/([\/_a-zA-Z0-9-]+)\.(gifv|mp4)/g,
|
||||||
'<video src="/$1.mp4" class="commentVideo commentObject" loop="" autoplay=""></video>'
|
'<video src="/$1.mp4" class="commentVideo commentObject" loop="" autoplay="" controls=""></video>'
|
||||||
).replace(
|
).replace(
|
||||||
/https?:\/\/[^.]*\.imgur.com\/([\/_a-zA-Z0-9-]+\.[a-z0-9A-Z]{2,6})/g,
|
/https?:\/\/[^.]*\.imgur.com\/([\/_a-zA-Z0-9-]+\.[a-z0-9A-Z]{2,6})/g,
|
||||||
'<a href="/$1" target="_blank"><img class="commentImage commentObject" src="/$1" loading="lazy" /></a>'
|
'<a href="/$1" target="_blank"><img class="commentImage commentObject" src="/$1" loading="lazy" /></a>'
|
||||||
|
|
Loading…
Reference in New Issue