Remove sandbox mode settings and iframe sandbox branching
This commit is contained in:
@@ -358,10 +358,6 @@ export function renderHtmlInIframe(htmlContent, container, preElement) {
|
||||
iframe.setAttribute('scrolling', 'no');
|
||||
iframe.loading = 'eager';
|
||||
|
||||
if (settings.sandboxMode) {
|
||||
iframe.setAttribute('sandbox', 'allow-scripts');
|
||||
}
|
||||
|
||||
const wrapper = getOrCreateWrapper(preElement);
|
||||
wrapper.querySelectorAll('.xiaobaix-iframe').forEach(old => {
|
||||
try { old.src = 'about:blank'; } catch (e) {}
|
||||
|
||||
@@ -671,8 +671,6 @@ class IframeManager {
|
||||
static writeContentToIframe(iframe, content) {
|
||||
try {
|
||||
const html = buildWrappedHtml(content);
|
||||
const sbox = !!(extension_settings && extension_settings[EXT_ID] && extension_settings[EXT_ID].sandboxMode);
|
||||
if (sbox) iframe.setAttribute('sandbox', 'allow-scripts allow-modals');
|
||||
iframe.srcdoc = html;
|
||||
const probe = () => {
|
||||
const targetOrigin = getIframeTargetOrigin(iframe);
|
||||
|
||||
Reference in New Issue
Block a user