We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have encountered a new issue after successfully loading https://www.hackernews.com/ inside an iframe:
This prevents navigation inside this iframe, which makes the site unusable. How do you guys work around this?
The text was updated successfully, but these errors were encountered:
My theory is that in order to make this work, I'll need to move this code outside of the inline block and inside its own JS file:
this.srcdoc = data.replace(/<\/head>/i, `<base href="${url}"> <script> // X-Frame-Bypass navigation event handlers function onChatInABoxClick(e) { if (frameElement && document.activeElement && document.activeElement.href) { e.preventDefault(); frameElement.load(document.activeElement.href); } } function onChatInABoxSubmit(e) { if (frameElement && document.activeElement && document.activeElement.form && document.activeElement.form.action) { e.preventDefault(); if (document.activeElement.form.method === 'post') { frameElement.load(document.activeElement.form.action, { method: 'post', body: new FormData(document.activeElement.form), }); } else { frameElement.load(document.activeElement.form.action + '?' + new URLSearchParams(new FormData(document.activeElement.form))); } } } document.addEventListener('click', onChatInABoxClick); document.addEventListener('submit', onChatInABoxSubmit); </script> </head>`);
Sorry, something went wrong.
Okay, moving the navigation event handlers into its own script resolved two of the errors, but these two errors remain:
Any ideas on how to resolve these remaining errors?
No branches or pull requests
I have encountered a new issue after successfully loading https://www.hackernews.com/ inside an iframe:
This prevents navigation inside this iframe, which makes the site unusable. How do you guys work around this?
The text was updated successfully, but these errors were encountered: