i see. maybe a confirm turning on js block as a block in the getters and setters would be good for the devs to add then. edit to your edit: good idea, that simplifies things a lot!
That would defeat the purpose, which is to require the actual human user to authorize using JS.
I interpret the
confirm turning on js block as asking the user if JS should be enabled (maybe also showing the scripts?).
yes, exactly what I was thinking. @bh would that be ok to add?
If the block does the turning on, then no. If the block just says "This project needs JS on, please turn it on" then you don't need us for that.
Wouldn’t you need JS for it to enabled JS meaning to run a JS enabling block they must enable JS? What?
yes, which means a js enabling block isn't plausible
look, the only problem, you can't turn on js in a project page.
The idea is, you shouldn't authorize JS code until you've read it.
yes, but the button on the project page would also show you the scripts.
bh please split your post and every post in this topic after it
I think they mean "pop up a dialog box that says 'Do you want to enable JS?' and show the user the JS scripts(there would be yes and no buttons on the window.)"
We're going to have to think more about how to handle this. You JS lovers are eager to get that feature, but we also have to think about the (vastly more numerous) users who don't know or care about JS and would be confronted by a mass of (maybe obfuscated) JS code.
Much more likely is that, over time, if we see a lot of projects doing some particular thing in JS that can't be done in Snap!, we'd make it a primitive or a library.
There are "SOOOOOOO many things" you can do in any programming language, including, for example, Snap!. I don't believe you've explored all of them.
Ok, let me give you an example, Snap! doesn't have a username block(I have no clue why) and with JS you can detect the user's username
Yeah, you may recall that Scratch warns you before running a project that detects your username... it's kind of a privacy hole.
But you can already easily get the username with the URL block:
No warning message in sight.
Hmm, you learn something every day. That tells you your username? How does it know?