Earlier today, I was editing my sandbox code and I accidentally created a while(true){} loop. It goes on forever, and breaks the tab every time I open the sandbox. I currently have no way/idea of how to access my code.
I've gone through previous issues, but I haven't found any solutions that work for me. As of now, I just need a way to access the raw code by any means possible, but as I've already stated, it's impossible for me to access the code because every time I open the editor, it runs the code and stops the tab.
| Software | Name/Version|
| ---------------- | ---------- |
| 小odesandbox |
| Browser | Chrome
| Operating System | ChromeOS (when I'm mobile) and Windows (when I'm at home)
EDIT:
I've found a way to get the code from the sandbox. Simply using inspect element, finding the script sources, and copying them into a new sandbox (and deleting the infinite loop) fixes everything for me.
Hey @theangrybagel ,
As a workaround, you can also open the sandbox embed with the preview disabled: https://codesandbox.io/embed/lr21yjkvv7?view=editor . Unfortunately you can't save files from the embed.
I think being able to disable the preview in the editor in a similar manner would be more helpful.
I think being able to disable the preview in the editor in a similar manner would be more helpful.
This would be 馃敟!
I think being able to disable the preview in the editor in a similar manner would be more helpful.
Turns out there is, you can add runonclick=1 argument to the sandbox's URL, e.g. with the OP sandbox: https://codesandbox.io/s/lr21yjkvv7?runonclick=1 .
Closing this for now, given there is an "official" solution to the initial issue.
@lbogdan - I get 404 page when adding this :(
@yairEO check the format matches the above linked example: https://codesandbox.io/s/lr21yjkvv7?runonclick=1. What url are you adding it to?
Most helpful comment
Turns out there is, you can add
runonclick=1argument to the sandbox's URL, e.g. with the OP sandbox: https://codesandbox.io/s/lr21yjkvv7?runonclick=1 .Closing this for now, given there is an "official" solution to the initial issue.