|
Script Summary:
Automatically backup textareas in case of a crash |
this script has 1 topic, 2 posts |
This script has no reviews. |
Similar to Gmail's Auto-save Draft feature, this creates a per-page, persistent copy of textarea values that can be restored at a later time. Optionally performs the save automatically in the background. When you revisit a page with stored data, you will automatically be prompted as to whether to restore the textareas.
The data from textareas will optionally be saved under the following conditions:
- Automatically, every few seconds (off by default, but can be enabled for a particular page visit via the User Script Commands menu)
- When the textarea loses focus (on by default)
- Every time a key is pressed in the textarea (off by default)
- Manually, via the User Scripts Command menu
The data will optionally be purged under the following conditions:
- Form submit (off by default) (does not imply *successful* submit)
- After a specified number of days (5 days by default)
- Manually, via the User Scripts Command menu
Various settings, including intervals, whether auto-save is on by default, clear-on-form-submit, and save-on-keypress can be configured by editing the values at the top of the script source. The notification dialog can be styled there, as well.
Note that this script uses DOM:Storage, so will only work on Firefox 2.0 and above.
Also note that what constitutes "the same page" is a little open to interpretation. The default behavior is to use the full URL, including all query parameters and anchor points, which is the least likely to cause conflicts which overwrite saved data, but which is also the most likely to cause false negatives that make restoring the data troublesome. Custom URL definitions can be added in the source, and a future version might have a better mechanism for distinguishing pages. (Suggestions welcome!)





