Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Textarea Backup

Retains text entered into textareas.

The primary purpose of this userscript is to save having to retype lost emails, forum posts, bug submissions, etc. The backup should be transparent so if the page is reloaded for whatever reason, be it browser crash, unintended exit or a forgetful website, the previously entered text will be restored.

When you enter text into a textarea (i.e multiline text input areas) it is saved under the following conditions:
  • At each keystroke.
  • Every second.
  • When the textarea loses focus.
The stored text is then dropped when its form is submitted.

Updates:

  1. Gmail Cc:, Bcc: bug fixed.
  2. Backups saved more frequently.
  3. Now warns on restoring over existing content.
  4. Ability to restore from a previous backup via the Userscript Commands menu.
  5. Backups are now reset on forms which are submitted via the submit() method.
  6. Added support for UTF8 (thanks to wind for that).

Notes

  • Entries in about:config cannot be removed via the userscript, this is a limitation in the current GreaseMonkey API.
  • On occasion an older copy of text remains backed up, this may be due to conflicting JavaScript interactions.



Jun 27, 2008
Chris4 User

Thanks, trying it now.

http://www.pcworld.com/article/id,147266-page,4...

 
Dec 26, 2007
sizzlemctwizzle Scriptwright

Have you ever thought about using cookies to store the data instead. I might post a mod of this soon using cookies instead of storing values in about:config.

 
Nov 17, 2007
pogue User

Just thought I would mention that the Session Manager extension also allows the saving of unsubmitted text after a crash/exit, if it is configured to do so. Session Manager saves all of the data in text files under the user's profile, as opposed to saving them in the about:config section. It also allows the user to encrypt the saved sessions.

So, that might be something the script author may want to look to as an example for a different method of saving the data. Unfortunately, I am not familiar with creating GM scripts, so I don't know if this is applicable, but I just thought I would mention it.

white-txtarea-us.8.pogue25@spamgourmet.com

P.S. - If anyone has some hints on learning how to create GM scripts, please contact me and let me know, I would greatly appreciate it.

 
Sep 28, 2007
jerone Scriptwright

Maybe there should be a sort of expire time, were when passed, the entry's are emptied and deleted (to clean out about:config).

Have to say, very interesting script.

 
Sep 25, 2007
norz User

Sorry for the triple posting, there was an error with the site and/or my browser.

 
Sep 24, 2007
norz User

The idea is nice, but -like others said-, it doesn't do a great job for privacy (see in about:config).
There are plenty of entries in there, even for posts that have been properly submitted.
There's already a textarea protection in Firefox in case of crashes, so I'm going to uninstall this script until this issue is not solved.

 
Sep 24, 2007
norz User

The idea is nice, but -like others said-, it doesn't do a great job for privacy (see in about:config).
There are plenty of entries in there, even for posts that have been properly submitted.
There's already a textarea protection in Firefox in case of crashes, so I'm going to uninstall this script until this issue is not solved.

 
Sep 24, 2007
norz User

The idea is nice, but -like others said-, it doesn't do a great job for privacy (see in about:config).
There are plenty of entries in there, even for posts that have been properly submitted.
There's already a textarea protection in Firefox in case of crashes, so I'm going to uninstall this script until this issue is not solved.

 
Sep 5, 2007
rowboat User

The issue that causes this script to fill in the hidden BCC field in gmail also (of course) fills in the hidden CC field. If you use this script, be sure to add the following URL's (with "*" wildcards) to your list of excluded sites - otherwise you'll end up CC'ing the last person you CC'd every time you compose a new message ;(

http://mail.google.com/*
https://mail.google.com/*

PS - in my opinion this is a major issue with use of this script. Can't it be altered to not fill in hidden textareas?

 
Jun 14, 2007
Michael Cronin User

In reviewing my about:config file, I see that there are several textarea backup entries containing text that was backed up. If these backups are no longer necessary, can these entries be deleted? Is there a way to automate the entry deletion? (Might need another script for that, I guess.)

 
Jun 8, 2007
wind User

Hi
I made a little change to this script to make it work with utf-8. Just add two functions to it use them to replace the calls to GM_getValue and GM_setValue:

function getValue_utf8(myVariableName) {
var value = GM_getValue(myVariableName);
if (value.length ==0)
return value;
return decodeURI(value);
}

function setValue_utf8(myVariableName, myVariableValue) {
GM_setValue(myVariableName, encodeURI(myVariableValue));
}

 
Apr 27, 2007
simon! Scriptwright

"Great Job!"??? Not quite (yes & no)

I deleted my backups, so I cant upload any testify of it, but who want to see his\her history web life... you might want to go to about:config and in the Filter field enter "greasemonkey", and you'll see a huge history archives of YOU in the web...

I would be great if I'll be able to get more, woops I meant "any", control on my backups!!!

Thanks.
Simon.

Great script I must to say! :)

 
Apr 24, 2007
Daniel Kimbe... User

Great Job!

 
Apr 16, 2007
senseBOP Scriptwright

Your script is great, but because your lack of knowledge/attention, you didn't exclude Gmail properly. That caused many people, myself included, great troubles, as the BCC field, which is hidden by default, kept it's content and sent many mails to people it shouldn't have.

You need to change your excludes to this:
@exclude http://mail.google.com/*
@exclude https://mail.google.com/*

Hope you fix this soon, as it's a really important script to have.

You should also take gabedibble's suggestion, and add support to auto-updates: http://userscripts.org/scripts/show/2296

 
Apr 8, 2007
gabedibble Scriptwright

Author: Please check out User Script Updates - simply update the header of your script and your users will be able to receive change-notification when you improve this script

 
Apr 2, 2007
gabedibble Scriptwright

i had the same problem that Narsil did, but with the BCC field in gmail, which was worse as tons of ppl got an email that i didn't intend.

i've disabled this until there's an update.

great idea though ;)

 
Apr 1, 2007
angus Scriptwright

To: MacTed
I don't think it is that worse. First, it only backup the <textarea>, not <input />, so login/password shouldn't be included. And it backup only if you type something, leave it and don't submit, which shouldn't be frequent.

Leaving entries in about:config is a problem. I hope greasemonkey can fix it by removing entries if GM_setValue a empty string. The bottom line is I can remove it in pref.js, which takes 1 min, and a successfully backup can save me much more time than that.</textarea>

 
Mar 30, 2007
MacTed User

cool... until I noticed that it was creating one new Preference for EACH textarea it saved -- and while I can purge the saved value, I cannot purge the Preferences... (check your about:config)

worse than that, I keep dozens of tabs open at once -- often with many of them having textareas for username and/or password and/or comment entry -- and this seems to be pushing Firefox into a perpetual backup cycle, just slurping down the CPU and otherwise.

also, it's not purging all saved textareas when their parent forms are submitted. I don't know why, and I don't really want to figure out why -- I just want to get rid of the script and its lingering droppings.

I've uninstalled, and told Greasemonkey to delete associated preferences -- but they remain in about:config!

sometimes, an experimental script should not be released into the wild.

 
Mar 29, 2007
Narsil User

Hoho ! Thanks tangonerd !

I saw that in the "to" field of gmail and didn't understand why. Even posted on gmail user group and had the answer : delete your cookies !

I've disabled the script until update.

 
Mar 24, 2007
tangonerd User

dangerdangerwarningwillrobinson You might want to check your CC and BCC fields on every email after you install this script. In gmail,for instance, unless you click "add CC" or "add Bcc" and have a look "under the hood", you may not realize you're CCing and/or Bccing every ensuing email to the most recent address(es) you entered. Seems like a bug, but if you share a computer with someone you'd like to prank or spy on, could be a feature. BCC:boss,mom,nytimes,etc.

 
Mar 22, 2007
Mattie 2 Scriptwright

Works great in GreaseMonkey for Firefox! Great script.

But please see if you can fix this to work with IE (via Turnabout):
http://www.reifysoft.com/turnabout.php

You'd be addressing a major IE problem for those of us who have to use it once in a while. Currently Turnabout gives object doesn't exist errors in the console (with no real stack trace for me to tweak).

Some resources for tracking down issues can be found here:
http://www.reifysoft.com/developers.php

 
Mar 19, 2007
Henrik N Admin

Great script; thank you!

You could comment on this script if you were logged in.