Open Modal from Embedded HTML (JavaScript)

I’m using to allow users to import data into my application (for context, I am not using Bubble’s database - I am using Xano).

I have a code snippet that I embed on a page in my application that is supposed to launch a modal (popup) but it only works if “Display as an iFrame” is checked. How can I not display it in an iFrame and launch the modal like normal? Basically I need to modify my code to launch the modal in the parent window (I think), but I don’t know enough about JavaScript to know how to modify this. I have another “hacky” solution but I don’t like it.

The code that I am using from is below. Can anyone help me?