Re-written for Firefox 27+

Since Firefox 27, Scratchpad is now using CodeMirror, replacing Orion.