In this project of mine, some scripts automatically start without hitting the green flag. After that, they open up presentation mode and make the close presentation mode button run back and forth from two places at random times.
Oh that's extremely clever. I especially like changing the stage size while in presentation mode so that only the button changes visibly.
As for starting automatically, enjoy it while you can; I think it's a bug. We're concerned about projects with JSFunction blocks starting automatically and doing something malicious. But maybe we can restrict only those projects from starting automatically; we'll see.
Do you mean restricting only the projects using JS blocks from auto start? I think it's great that I can make safe stuff auto start.
Yeah, there's a grey area of JS blocks from official libraries. The trouble is that you can get a flag setting block from a library, then edit it before saving your project, so it's not easy for us to know for sure what's safe.
Maybe there should be some special ID in the code for unchanged official blocks that changes whenever you edit it and save.
Maybe there should be a sandbox for JS blocks and different APIs will be in than normal.
Hi, welcome to the forum.
We've talked about sandboxing, but so far Jens hasn't found a way to do it that he likes.
How I got the code:
- Open the project with firefox https? logger open.
- Save the last request.
- Clone the Snap! repository.
- Make a file called
- Copy the toggleAppMode function from
- Add a script to
- Add a line after the definition in
appMode = false;
- Load the project in offline modified Snap!