Hacker tips

Adding your own custom libraries

JS Bin comes with out of the box support for a number of libraries, but if you're comfortable on the command line, you can add your own (I plan to add the UI to do this eventually if it's a useful function).

The format for a new library entry is as follows:

{ 
text: 'My Category',
requires: 'http://someotherlibary.com/lib.js', // optional
style: 'http://someotherlibary.com/style.css', // optional
scripts: [
  { text: 'My library', url: 'http://foo.com/somelib.js' }
]
}

There's a variable called libraries on the global namespace, with two methods: add and clear.

To add this library, open your console, and run the following (changing the library for your own):

libraries.add({ text: 'My Libraries', scripts: [ { text: 'Foo 1.0', url: 'http://foo.com/bar-1.0.js' } ] });

These changes will save to your browser (on those browsers that support the Storage API - all the latest versions of browsers), and will remain until you call libraries.clear()

Create your own bespoke url namespace

You can trick JS Bin in to thinking the bin has already been created by accessing the url directly, such as http://jsbin.com/foo/edit. At this point the code isn't saved and technically you've hit a non existent namespace. Once you hit 'new revision', it save a new revision. At that point the code is saved, and successive revisions will be saved (i.e. revision 2 and onwards).