An undo / redo history module for JavaScript