Textarea Backup with expiry

By Crend King Last update May 20, 2009 — Installed 2,882 times. Daily Installs: 11, 4, 5, 19, 14, 7, 9, 20, 18, 13, 12, 30, 19, 6, 13, 10, 10, 21, 8, 11, 13, 5, 8, 5, 11, 2, 19, 13, 12, 26, 20, 11
Script Summary:
Retains text entered into textareas, and expires after certain time span.
Version: 1.0.4

This script has no discussions.

start the discussion

This script has no reviews.

This script is based on Textarea Backup by Dan Brook. I mainly add the expiration functionality to it, so that an abandoned backup will be automatically deleted after certain time span. This is especially useful if there is not a submit action for the textarea's associated form (e.g. Google Translate).

Options and changes

  • keypress_backup: control backup textarea when press a key. (default false)
  • blur_backup: control backup textarea when it loses focus. (default true)
  • timed_backup: control backup textarea at time interval. (default true)
  • backup_interval: control the interval of timed backup. (default 10 seconds)
  • keep_after_submission: use this if you still want to keep the backup until expiration happens. Make sure expiration is enabled or backup will never be automatically deleted. (default false)
  • ask_overwrite: set to true if you want a a confirmation window of restoration is displayed when the target textarea of is not empty. Otherwise, the restoration is always skipped if not the textarea is empty. However, you can manually restore using Greasemonkey's user command menu. (default true)
  • expiry_timespan: control the time a backup will expire. If a textarea is backed up but never used, the backup will be deleted after this time. The check is carried out when the script is loaded, thus no need to visit the original URL. Specify 0 to disable expiration. (default 30 minutes)
  • On submit, the associated backup will be directly deleted (unless keep_after_submission is true).
  • Minor issues fixed.

Please open the script file to change the options.

Version history

1.0.4 on 04/22/2009:
- Synchronize with the original Textarea Backup script.

1.0.3 on 03/08/2009:
- Add "ask overwrite" option.

1.0.2 on 03/04/2009:
- Add "keep after submission" option.

1.0.1 on 02/22/2009:
- Extract the expiry time stamp codes to stand-alone functions.

1.0 on 02/21/2009:
- Initial version.