Dirty input listener

Type in the editor. The page registers beforeunload once it becomes dirty, matching the common Google Docs-style unsaved-change pattern.

Navigate away
dirty=false armed=false