remove duplicate autoplay=1 and fix the amp issue

master
Aevann 2024-02-13 12:44:54 +02:00
parent 0c1b7de58c
commit 9440619582
3 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ def allowed_attributes(tag, name, value):
if name == 'data-user-submitted' and not value: return True
if tag == 'lite-youtube':
if name == 'params' and value.startswith('autoplay=1&modestbranding=1'): return True
if name == 'params': return True
if name == 'videoid': return True
if tag == 'video':

View File

@ -296,7 +296,7 @@ def handle_youtube_links(url):
if yt_id_regex.fullmatch(id):
if not t:
t = params.get('t', params.get('start', [0]))[0]
html = f'<lite-youtube videoid="{id}" params="autoplay=1&modestbranding=1'
html = f'<lite-youtube videoid="{id}" params="modestbranding=1'
if t:
html += f'&start={t}'
html += '"></lite-youtube>'

View File

@ -82,7 +82,7 @@
<td>Youtube Videos</td>
<td>https://youtube.com/watch?v=3Hecr51ByE4</td>
<td>
<lite-youtube videoid="3Hecr51ByE4" params="autoplay=1&modestbranding=1"></lite-youtube>
<lite-youtube videoid="3Hecr51ByE4" params="modestbranding=1"></lite-youtube>
</td>
</tr>
<tr>