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 name == 'data-user-submitted' and not value: return True
|
||||||
|
|
||||||
if tag == 'lite-youtube':
|
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 name == 'videoid': return True
|
||||||
|
|
||||||
if tag == 'video':
|
if tag == 'video':
|
||||||
|
|
|
@ -296,7 +296,7 @@ def handle_youtube_links(url):
|
||||||
if yt_id_regex.fullmatch(id):
|
if yt_id_regex.fullmatch(id):
|
||||||
if not t:
|
if not t:
|
||||||
t = params.get('t', params.get('start', [0]))[0]
|
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:
|
if t:
|
||||||
html += f'&start={t}'
|
html += f'&start={t}'
|
||||||
html += '"></lite-youtube>'
|
html += '"></lite-youtube>'
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<td>Youtube Videos</td>
|
<td>Youtube Videos</td>
|
||||||
<td>https://youtube.com/watch?v=3Hecr51ByE4</td>
|
<td>https://youtube.com/watch?v=3Hecr51ByE4</td>
|
||||||
<td>
|
<td>
|
||||||
<lite-youtube videoid="3Hecr51ByE4" params="autoplay=1&modestbranding=1"></lite-youtube>
|
<lite-youtube videoid="3Hecr51ByE4" params="modestbranding=1"></lite-youtube>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue