forked from MarseyWorld/MarseyWorld
remove duplicate autoplay=1 and fix the amp issue
parent
0c1b7de58c
commit
9440619582
|
@ -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':
|
||||
|
|
|
@ -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>'
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue