1. Download Greasemonkey add-on and install it in your Firefox.
2. Download Rapidshare Links Checker User Script from here and install the User script using GreaseMonkey.
3. Restart Firefox
Now, whenever you go to a webpage that contains Rapidshare, Megaupload, Filefactory, etc links, this User Script will come into play. If it finds dead links, it’ll have an X icon at the end of the link and a checkmark icon for a valid working link.

II
There are many Firefox add-ons which work in a similar fashion but their working is limited to only Rapidshare. One of such add-on is RSE Tools for Firefox.

Features of RSE Tools:
Getting Rapidshare links from a specific page
Testing selected Rapidshare links on a page
Search Rapidshare files for selected terms using RSE (Rapidshare-Search-Engine)