This commit is contained in:
GZod01 2024-05-18 18:18:42 +02:00
parent 9a3f24609c
commit 16676c9ab1
2 changed files with 2 additions and 1 deletions

View file

@ -4,5 +4,5 @@
{{ else if (.Get "src") }}
{{ $code = (.Get "src") }}
{{ $code = (strings.ReplaceRE `(http(?:s)?:\/\/(?:www\.)?youtu(?:(?:be\.com)|(?:\.be))|(?:be-nocookie\.com))\/(?:(?:watch\?v=)|(?:embed\/)|(?:\/v\/))?(.+)?(?:\&|\?)` "" $code) }}
<a class=youtubelink href="https://youtu.be/{{ $code }}"><img src="http://i3.ytimg.com/vi/{{ $code }}/hqdefault.jpg"/></a>
{{ end }}
<a class=youtubelink href="https://youtu.be/{{ $code }}"><img src="http://i3.ytimg.com/vi/{{ $code }}/hqdefault.jpg"/></a>