[ANSWERED] Possibly Corrupted Patch
I don't know how to help you in this specific case, but you should definitely have a look into Isadoras auto backup and versioning capabilities for future incidents!
Preferences -> Auto save
it may help to set the preferences to load none (don't load a scene on opening), then open the file and pause the engine. Once paused open the scene and edit the JS. That process may allow you to do what you need. Michel's suggestion should work for sure.
Did you try my suggestion?
It could work because you are stopping the execution of the JS before going to edit it.
It wouldn't remove your code.