3 ms·
So I whipped up a standalone HTML page to use to develop Dwitter scripts without having to use their interface (which seems prone to crashing). Here's the sourc
by russellbeattie 10y ago
So I whipped up a standalone HTML page to use to develop Dwitter scripts without having to use their interface (which seems prone to crashing). Here's the source: https://gist.github.com/russellbeattie/ef27709f7c916ea54454cbc3866d4d2f https://gist.github.com/russellbeattie/ef27709f7c916ea54454c... and you can see it live on my site: http://www.russellbeattie.com/dwitterish.html http://www.russellbeattie.com/dwitterish.html
Interestingly, I found that some scripts really don't like using eval(), so I modified the page to dynamically swap in new <script> elements with the code instead, and a flag to go back and forth.
Here's an example of a script which doesn't like eval() - it runs noticeably faster when embedded in a script: https://www.dwitter.net/d/697 https://www.dwitter.net/d/697
Edit: Added the ability to just embed the code in the URL: http://www.russellbeattie.com/dwitterish.html#c.width%7C%3D0%3Bfor(n%3D200%3Bn-%3D1%2F64%3Bx.fillRect(n%253*666%2Cn*5%2Ch%3D8-k%2Ch))for(r%3DC(t*3)%2Ci%3DS(t*4)%2Ck%3D28%3B--k%2Fr%3Bi%3Dj)j%3D2*r*i%2B1-n%2F99%2Cr%3Dr*r-i*i%2B1-n%253 http://www.russellbeattie.com/dwitterish.html#c.width%7C%3D0...
(Note that I only tested this on Chrome, so feel free to modify if there's issues.)
- kornish 10y agoThis is cool! You should consider submitting a patch back upstream with that script embedding improvement.
- sigvef 10y agoWe've gone full circle! This thing started as a stand-alone HTML page for dweets with ability to embed the code in the URL: http://arkt.is/t http://arkt.is/t (hover to show editor). GitHub: https://github.com/sigvef/arktis-tweet-demo https://github.com/sigvef/arktis-tweet-demo . Here it is with the same dweet embedded: http://arkt.is/t/Yy53aWR0aHw9MDtmb3Iobj0yMDA7bi09MS82NDt4LmZpbGxSZWN0KG4lMyo2NjYsbio1LGg9OC1rLGgpKWZvcihyPUModCozKSxpPVModCo0KSxrPTI4Oy0tay9yO2k9ailqPTIqcippKzEtbi85OSxyPXIqci1pKmkrMS1uJTM= http://arkt.is/t/Yy53aWR0aHw9MDtmb3Iobj0yMDA7bi09MS82NDt4LmZ... . Incidentally, this is where the "dwitter" name came from: "demos" as in the demoscene (https://en.wikipedia.org/wiki/Demoscene https://en.wikipedia.org/wiki/Demoscene) and twitter.