I added a link to my discord server in an html5 game, but clicking on it doesn't work. So I checked the source code, and this snippet seems to handle opening url to a browser window:
It fails if the protocol is not http or https, but upon logging the URL object u, I get this:
The protocol is https: and not http as it should be.
It also works properly if I edit the first code snipped to allow http: and https: instead of http and https.
Is it a bad config on my end or is there indeed a bug in itch.io's code?