add a sandbox to all iframes

master
Aevann 2024-08-17 02:07:45 +03:00
parent bdd32f88c0
commit 63dfa5f3fb
2 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -148,12 +148,12 @@
{% elif p.url.startswith('https://tiktok.com/@') %}
{% set id = p.url.split('/video/')[1] %}
{% if id %}
<iframe id="external-embed" scrolling="no" src="https://www.tiktok.com/embed/{{id}}" height="756" width="325"></iframe>
<iframe id="external-embed" sandbox="allow-scripts allow-same-origin allow-popups" scrolling="no" src="https://www.tiktok.com/embed/{{id}}" height="756" width="325"></iframe>
{% endif %}
{% elif p.url.startswith('https://www.teamblind.com/') %}
{% set id = p.url.split('-')[-1] %}
{% if id %}
<iframe id="external-embed" credentialless="true" scrolling="no" class="autoresizable" src="https://www.teamblind.com/embed/{{id}}" height="500" width="500" style="max-width:100%"></iframe>
<iframe id="external-embed" credentialless="true" sandbox="allow-scripts allow-same-origin allow-popups" scrolling="no" class="autoresizable" src="https://www.teamblind.com/embed/{{id}}" height="500" width="500" style="max-width:100%"></iframe>
{% endif %}
{% elif p.url.startswith('https://instagram.com/') %}
{% set path = p.url.split('https://instagram.com/')[1].rstrip('/') %}
@ -162,13 +162,13 @@
{% else %}
{% set path = path + '/embed' %}
{% endif %}
<iframe id="external-embed" credentialless="true" scrolling="no" class="autoresizable" src="https://www.instagram.com/{{path}}" style="width:calc(100% - 2px);min-width:326px;max-width:540px"></iframe>
<iframe id="external-embed" credentialless="true" sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" scrolling="no" class="autoresizable" src="https://www.instagram.com/{{path}}" style="width:calc(100% - 2px);min-width:326px;max-width:540px"></iframe>
{% elif p.domain.endswith('substack.com') %}
{% if 'substack.com/p/' in p.url and p.url.count('/') == 4 %}
<iframe id="external-embed" credentialless="true" scrolling="no" class="autoresizable" src="{{p.url.replace('substack.com/p/', 'substack.com/embed/p/')}}?origin={{SITE_FULL}}" height="500" width="500" style="max-width:100%"></iframe>
<iframe id="external-embed" credentialless="true" sandbox="allow-scripts allow-same-origin allow-popups" scrolling="no" class="autoresizable" src="{{p.url.replace('substack.com/p/', 'substack.com/embed/p/')}}?origin={{SITE_FULL}}" height="500" width="500" style="max-width:100%"></iframe>
{% elif '/note/c-' in p.url %}
{% set id = p.url.split('/note/c-')[-1] %}
<iframe id="external-embed" credentialless="true" scrolling="no" class="autoresizable" src="https://substack.com/embed/c/{{id}}?origin={{SITE_FULL}}" height="500" width="500" style="max-width:100%"></iframe>
<iframe id="external-embed" credentialless="true" sandbox="allow-scripts allow-same-origin allow-popups" scrolling="no" class="autoresizable" src="https://substack.com/embed/c/{{id}}?origin={{SITE_FULL}}" height="500" width="500" style="max-width:100%"></iframe>
{% endif %}
{% endif %}
{% endif %}