Hi there! I found this piece of code in the Replit Badge code.
if (window.location.hostname.split('.')[1] === 'id') {
return;
}
When a repl is opened in the covered page, the link must be something.id.repl.co
where the something is the hash of this repl. The second segment would be a username instead of id
if it’s opened in a new tab.
You can change the return
part into other code that tell the user to go to a new page. I hope this can help you.