[Greasemonkey] halting navigation via Javascript

Alf Eaton lists at hubmed.org
Wed Oct 5 11:37:29 EDT 2005


On 05 Oct 2005, at 10:33, Matthew Weymar wrote:
>
> The immediate goal is to idiot-proof TiddlyWiki so that if I, for  
> example,
> inadvertently request a search using the search bar while editing  
> my TW
> file, I don't lose content in "tiddlers" I've not yet closed. (TW  
> does save
> in this situation, but only content in tiddlers that have been closed.
> Reloading the page would sacrifice all changes.)
>
> This is a more general problem, of course. There are other  
> applications in
> which one might stand to lose content by inadvertently navigating  
> away from
> a page prior to saving. I can imagine a script that would check, at  
> least
> certain 'sites, for open forms before allowing a new page to load.  
> If open
> forms were found, the user could be prompted, "Are you sure you  
> want to
> abandon changes to this form?..."

I've seen that on sites before, so it must be possible with a  
confirmation dialog.

alf.



More information about the Greasemonkey mailing list