This is really cool, but executing other people's javascript in a page makes me nervous. What sort of restrictions are in place to prevent malicious exploits?
Makes me quite nervous too. So far each dweet is run in a sandboxed iframe loaded from a separate subdomain. There are definitely things you can do, and I'm aware of some annoying ones. I'll just manually delete them at this point. Any security conscious person would view it with noscript and just read the javascript ;)
Dwitter – A social network for short JavaScript demos
61–70 of 74 posts
Re: Dwitter – A social network for short JavaScript demos
#62Oh fun, didn't expect to see my side-project here :) A few of my personal favorites: https://www.dwitter.net/d/90 https://www.dwitter.net/d/406 https://www.dwitter.net/d/433 https://www.dwitter.net/d/617
Re: Dwitter – A social network for short JavaScript demos
#63Oh fun, didn't expect to see my side-project here :) A few of my personal favorites: https://www.dwitter.net/d/90 https://www.dwitter.net/d/406 https://www.dwitter.net/d/433 https://www.dwitter.net/d/617
A little feedback, the tab got helluva laggy after scrolling down a few pages. I assume that's because you aren't unloading dwitters when they scroll past the top of the viewport - which you probably should. Chrome 56, Windows 10.
Edit: Link to the issue https://github.com/lionleaf/dwitter/issues/66
Re: Dwitter – A social network for short JavaScript demos
#64Earlier quoted context omitted.
Makes me quite nervous too. So far each dweet is run in a sandboxed iframe loaded from a separate subdomain. There are definitely things you can do, and I'm aware of some annoying ones. I'll just manually delete them at this point. Any security conscious person would view it with noscript and just read the javascript ;)
Why not make their javascript run in WebWorkers and provide a DOM-like interface for all the things? That way you can kill infinite loops etc.
Re: Dwitter – A social network for short JavaScript demos
#65Earlier quoted context omitted.
Makes me quite nervous too. So far each dweet is run in a sandboxed iframe loaded from a separate subdomain. There are definitely things you can do, and I'm aware of some annoying ones. I'll just manually delete them at this point. Any security conscious person would view it with noscript and just read the javascript ;)
how do you sandbox the iframe/code?
Re: Dwitter – A social network for short JavaScript demos
#66Re: Dwitter – A social network for short JavaScript demos
#67Oh fun, didn't expect to see my side-project here :) A few of my personal favorites: https://www.dwitter.net/d/90 https://www.dwitter.net/d/406 https://www.dwitter.net/d/433 https://www.dwitter.net/d/617
Infinite loops (accidental in my case) should probably be catched in some way.
Re: Dwitter – A social network for short JavaScript demos
#68Oh fun, didn't expect to see my side-project here :) A few of my personal favorites: https://www.dwitter.net/d/90 https://www.dwitter.net/d/406 https://www.dwitter.net/d/433 https://www.dwitter.net/d/617
It's fun to optimize the code under 140 bytes. https://www.dwitter.net/d/832
Re: Dwitter – A social network for short JavaScript demos
#69Oh fun, didn't expect to see my side-project here :) A few of my personal favorites: https://www.dwitter.net/d/90 https://www.dwitter.net/d/406 https://www.dwitter.net/d/433 https://www.dwitter.net/d/617
Infinite loops (accidental in my case) should probably be catched in some way.
maybe the script tag should support that one day
Re: Dwitter – A social network for short JavaScript demos
#70This is the coolest website I've seen in a long time. Awesome idea. EDIT: one issue I'm running into is it's easy to accidentally write half-finished code that freezes my browser. It would be nice to have an option to only refresh the preview upon clicking some kind of button.
One trick you learn as a dweeter is to write all for-loops as "fr" instead of "for", and then only adding the last "o" when you feel confident that the loop won't accidentally go on forever!