|
Script Summary:
Changes eDoc links from JavaScript links to normal links. |
This script has no discussions. |
This script has no reviews. |
This script is active in the eDocuments section of the Charles Schwab online brokerage web site. The eDocuments feature gives you access to old statements and other items, such as trade confirmations and 1099s, in the form of PDF files. You give it a date range, and it shows links to each of the available docs. Docs are online going back ten years.
The problem is that the document links run a JavaScript snippet that opens a brain dead popup window which immediately proceeds to download the document under the useless name 's.pdf'.
This script changes the JavaScript links to normal links, resulting in several benefits:
- No obnoxious popup.
- Right-clicking a link and choosing "Save Link As..." now works.
- The name of the download is now initialized to something sensible, such as 'Statement_Jul-07_9999.pdf', where 9999 is the last four of your account number.
- If you have a large number of docs to download, you can use a download manager, such as FlashGot, to download all the PDF links on a page at once (Schwab will show you a year's worth at once). The docs will have unique and meaningful names, which you can change easily with a script after downloading, if you don't like Schwab's naming convention.
Note: If you use a download manager, you may also want to investigate the allcookies extension. It saves the session cookies in a file where the download manager can find them, thus allowing the download manager to authenticate itself to Schwab. You will want to invoke the Allcookies entry in the Tools menu prior to each use the download manager, in order to ensure that the download manager's Schwab session has not timed out. You will also want to examine the downloaded files to make sure they really contain valid PDFs and not error page HTML.
I recently decided to go paperless. I've had a Schwab account for about 20 years. So, I scanned in the first decade's worth of paper. But feeding the scanner is tedious, so I wanted to access the Schwab archive, going back as far as possible. Hence, the motivation for this script.
Schwab, if you're reading this, you need to (1) get rid of those absurd JavaScript links and obsolete this script and (2) provide a link to download multiple documents in a zip archive to encourage more customers to go paperless!
Maybe list the documents with checkboxes alongside. Customer checks the docs he wants, presses download, gets a zip archive with the checked docs. It would also be cool to add a naming convention spec, with strftime-style substitutions for document type, year, month, day, account title, etc., allowing the customer to control how the documents are named.





