Script Summary: It's really annoying when you accidentally navigate away from a page while entering text and lose everything you just wrote. This script fixes that.
I made this script mainly for use on my thinkpad which has browser navigation buttons directly above the arrow keys. They're pretty handy normally, but I'm forever hitting them by accident while typing, losing whatever text I'm in the process of writing.
This simple script pops up a warning if you attrmpt to navigate away from a page while entering into a textarea.