Revert "dont run on iframe (#368)" (#370)

This reverts commit 823fdcdd97.
This commit is contained in:
Thomas Zarebczan 2021-11-25 11:08:21 -05:00 committed by GitHub
parent 823fdcdd97
commit 11c8024c2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,20 +332,6 @@ function App(props: Props) {
// add secure privacy script // add secure privacy script
useEffect(() => { useEffect(() => {
// check if loaded from iframe
function inIframe() {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
const loadedFromIframe = inIframe();
if (loadedFromIframe) {
return;
}
const script = document.createElement('script'); const script = document.createElement('script');
script.src = securePrivacyScriptUrl; script.src = securePrivacyScriptUrl;
script.async = true; script.async = true;