Scrubby

Grab a literal in the code and drag left-to-right to update the value in real-time. Inspired by Bret Victor.

Scrubby works by transforming your code using esprima and escodegen to replace any literal references by a reference into a global table of values. When you scrub a value, scrubby just updates the global table, so the next time your code references that literal, it receives the edited value.

Using scrubby in your own code is easy: just add <script src='http://nornagon.github.com/scrubby/scrubby.all.js'> to your page and add type='text/scrubby' to scripts you want to be able to scrub. See github for more details.

Written by me, Jeremy Apthorp. You should follow me on Twitter.

Fork me on GitHub