Embed repl.it into card

I’m trying to embed a repl.it link into an iframe in a card like this:

<iframe frameborder="0" height="500px" src="https://repl.it/@bdakter/Test#main.rb?lite=true" width="100%"></iframe>.

This is following the directions on repl.it. However, the iframe gives an error message “repl.it refuses to connect”.

I tried using an iframe with a Codepen url and that did work, so it appears that Anki does support rendering iframes. How can I go about debugging this issue?

This is a screenshot:

Thanks in advance!

maybe:

You can now debug the webviews using an external Chrome instance, by setting the env var QTWEBENGINE_REMOTE_DEBUGGING to 8080 prior to starting Anki, then surfing to localhost:8080 in Chrome.

https://addon-docs.ankiweb.net/#/porting2.0?id=webview-changes

2 Likes

This was very helpful!

Did you solved the problem? Can you share what did you find out? (it can help other who find this through google search).

Basically, it appears that the request to repl.it was blocked because the x-sesson-options response header was being set to deny. This itself is strange as the site itself gives instructions for embedding in iframes.

I partially solved the issue by using my study deck in the webapp (not the desktop app), and using this Chrome extension to remove the x-session-options header altogether. I haven’t been able to solve the issue for the desktop app though.

1 Like