enh: iframe sandbox policy setting
This commit is contained in:
@@ -63,6 +63,9 @@
|
||||
|
||||
let webSearch = null;
|
||||
|
||||
let iframeSandboxAllowSameOrigin = false;
|
||||
let iframeSandboxAllowForms = false;
|
||||
|
||||
const toggleExpandDetails = () => {
|
||||
expandDetails = !expandDetails;
|
||||
saveSettings({ expandDetails });
|
||||
@@ -245,6 +248,16 @@
|
||||
saveSettings({ webSearch: webSearch });
|
||||
};
|
||||
|
||||
const toggleIframeSandboxAllowSameOrigin = async () => {
|
||||
iframeSandboxAllowSameOrigin = !iframeSandboxAllowSameOrigin;
|
||||
saveSettings({ iframeSandboxAllowSameOrigin });
|
||||
};
|
||||
|
||||
const toggleIframeSandboxAllowForms = async () => {
|
||||
iframeSandboxAllowForms = !iframeSandboxAllowForms;
|
||||
saveSettings({ iframeSandboxAllowForms });
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
titleAutoGenerate = $settings?.title?.auto ?? true;
|
||||
autoTags = $settings.autoTags ?? true;
|
||||
@@ -746,7 +759,9 @@
|
||||
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs">{$i18n.t('Haptic Feedback')}</div>
|
||||
<div class=" self-center text-xs">
|
||||
{$i18n.t('Haptic Feedback')} ({$i18n.t('Android')})
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded-sm transition"
|
||||
@@ -850,6 +865,46 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs">{$i18n.t('iframe Sandbox Allow Same Origin')}</div>
|
||||
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded-sm transition"
|
||||
on:click={() => {
|
||||
toggleIframeSandboxAllowSameOrigin();
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{#if iframeSandboxAllowSameOrigin === true}
|
||||
<span class="ml-2 self-center">{$i18n.t('On')}</span>
|
||||
{:else}
|
||||
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs">{$i18n.t('iframe Sandbox Allow Forms')}</div>
|
||||
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded-sm transition"
|
||||
on:click={() => {
|
||||
toggleIframeSandboxAllowForms();
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{#if iframeSandboxAllowForms === true}
|
||||
<span class="ml-2 self-center">{$i18n.t('On')}</span>
|
||||
{:else}
|
||||
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" my-1.5 text-sm font-medium">{$i18n.t('Voice')}</div>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user