Preview The HTML file that I am currently editing

When I switch to a different HTML tab and press “RUN” the webveiw shows the HTML that i was editing before.

This is really annoying and i would like to know if there is a way to fix this.

Screenshots, links, or other helpful context:

code snippet

You can just type in your new file name into the URL bar:

1 Like

I know that, its just super annoying to need to do that.

I’m pretty sure that @Firepup650 created a script which automatically does that for you.

1 Like

What? The only script I’ve made for Replit is my custom python migration one.

3 Likes

IIRC someone made a script which you can inject into run in .replit.

1 Like

Are you talking about UMAR’s script to run the most recently edited file? If so, his was originally in Python. It will never work in HTML Repls. An HTML Repl doesn’t “run” a specific file. It simply serves all of your files, and it is default behavior by the browser to display the index.html file at / (I think).

2 Likes