[SyntaxError, Unexpected token 'export']
# 🤝help
Hey I'm trying to figure out a way to use a code execution card to modify the link target in a previous text card. I managed to make it work with javascript, but as I understand that will only work in the emulator, not on published web, I checked this post, but it does not really apply to me I think, as I didn't see a solution. not sure if any of this would actually work, just playing around, but if anyone knows why I get this error....... https://discord.com/channels/1108396290624213082/1172768423609106513 https://cdn.discordapp.com/attachments/1234662511530475580/1234662838140932187/Screenshot_2024-04-29_at_5.28.53_PM.png?ex=66318cdf&is=66303b5f&hm=a57e3fbaa3e6c1695bf58246ba330c1e48117a5796e998f94abc1bbffcc47289&
my code....
anyway, just trying to be clever in finding a way to modify the target from _blank so that the link opens in the same window. not sure if it's possible or not...
I did manage to figure out a way to open urls in the parent window. by creating a single choice card and then leading to "send custom event" which sends a TRIGGER to send a url payload to a script on the website to open a link, which opens in the same window. that way after a user message, I ask the user if they want to read more, a yes leads to a send custom event, which sends the url to the script and it opens the window. not exactly what I was hoping to do, this doesn't change urls that are posted in the chat, but it does offer a method of being able to have the user click a button to open up a link in the same window.