Check out the Snap! API.
unfortunatly I don't think it can do what i was wanting. still cool though!
Snap! is ready to be "remotely controlled" with the postMessage described in the API document.
So COORS is not an issue until you want some unusual pattern.
You can load a project from the Snap! cloud or modify Snap! in your browser with user scripts.
yeah that's what i thought. :(
can you tell us what you are trying to accomplish?
this site isn't really related but consider this when posting
But what is the real problem?
Why do you want to toggle JS extensions or whitelist extension urls?
Why Isn't running your own fork of the Snap! code with JS extensions enabled by default good enough?
Those are the two ways to allow a project to run unofficial js code in Snap!
I don't know much about this, but I assume it would have to be updated to each new Snap! version. It could work though if there is no other way to accomplish this.
You can make a copy of the Snap! code and upload it to your own website and then simply change the JS enabled flag to true (currently at line 610 in threads.js)
To keep it current with Snap! you would have to update it but only really required to do that on a major version change
Ok, I did that and it works, but are these a problem?
You can't load projects from Snap Cloud if your site is not whitelisted by Snap Dev.
Be cautious; you may be IP banned for unauthorized access to the cloud backend.
so what do I change to make it not try to access the Snap Cloud?
First of all, you will not get ip banned if you leave the cloud on. Those errors were not by trying to get a project from the cloud, they were instead just trying to initialize the cloud connection. I've left the cloud on on my snap mod for a long time, and I have not been banned.
Second, to turn off the cloud, go into `src/gui.js" and find
this.cloud = new Cloud();
Then under that line, just add this
That's all you need to do to disable the cloud.
that works, thanks!