Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
RS_LinkCheck
Rapidshare link parser / checker v2.3
When activated parses RS, lix and rapidsafe text URLs, then checks .de and .com links on the current page.
- Bugs in v2.2 -
If you installed version 2.2 prior to Mar 10, 2008, the script may have added some useless entries to your prefs file.
If you used the Preference Manager and hit the Apply button in that version, then you should uninstall the script making sure to check Also uninstall associated preferences. Then just install the script again. Version 2.3 will notify you if you need to do this, or you can reset the preferences yourself.
A Check for Update button is added to the preference manager, so you can check for an update whenever you want. It also tells you the version you are currently using. There are some bugs when you try to check more then 150 links, I'm aware of the problems and I'm reworking the code. I never download that many links in one sitting anyway.
The link-checking status box. 
Indicates total, good and bad links checked. Updates in real time. Notifies you when you have reached the link-checking limit.
The Preference Manager form. 
Change your preferences at any time by selecting the RS_LinkCheck preferences User Script Command.
Useage
Parse and Check Rapidshare links
To activate on the current page, press - Shift+R
You may need to click anywhere on the page first.
Parse text URLs, create A links only.
To activate on the current page, press - Shift+A
Open Selection in new tab
To activate on the selected text, press - Shift+S
Preference Manager for changing options.
You can use the menu item...
Tools -> Greasemonkey -> User Script Commands... -> RS_LinkCheck preferences
to set your preferences.
You can change the activation key to any other key, or any character code greater than 9. An upper case letter requires using shift.
RS members should not need to disable direct downloads to use this script.
Features
- Converts plain text URLs to hyperlinks.
Press - Shift+A to activate this function.
It looks for rapishare, lix.in and rapidsafe.net in the page text, then converts them to links.
De-munges links like "hxxp" and attempts to fix very long broken links.
It tries to preserve the original text, while providing you with a working link to the actual RS file.
Adds a tool-tip message[linked], adds a "_blank" target, and in most cases will remove click handlers on these links (needs testing). - Changes some "redirect" links to a link of the actual file.
- Checks RS links for existing files.
Press - Shift+R to both create hyperlinks (the above) and activate this function.
Adds a green + after good links. This is done with the CSS :after selector.
Adds a tool-tip indicating the file size in bytes, see screenshot above.
lix and rapidsafe links are replaced with the RS file link whenever possible. - The link checking status is shown in a transparent box at the lower-right corner.
- Skips duplicate links, these are marked with a blue *.
- Links that return a "file deleted" message are marked with a gray ?.
The script checks for the Content-Type: text/html header which indicates the file isn't there, or some other message. The message isn't checked, the page body isn't asked for but part of it is sent anyway, see below.
lix and rapidsafe pages are parsed in order to get the RS link, if it cannot be found then the link is marked with the gray ?. - If the RS server returns any error code (numbers above 400), nothing happens and the link isn't tagged at all. I have never seen this happen, but their servers do sometimes go down.
Rapidsafe and lix aren't checked for a "200 OK" response, I will likely fix this if it becomes a problem. - This script works even with "Direct Downloads" enabled. But just in case that fails it only requests the first 2 bytes.
- Will open a selected text URL in a new tab.
Press - Shift+S to activate this function on a selection.
Useful for viewing URLs that aren't hyperlinked, like image previews. For example, drag the mouse over this:http://userscripts.org/forumspress Shift+S, and it will open that link in a new tab.
This feature tries to remove spaces and line breaks, so thatuser scripts.orgwill work as well (which makes it useful to Linux users too). - You can change the activation keys and the check limits in the preference manager.
Select the RS_LinkCheck preferences User Script Command.
When you hit Apply, these settings are saved and take effect immediately.
Debug mode is not saved, see below. - Links have class names added so that you can change the way they look using Stylish and/or UserContent.css or in the script itself...
.rs_linkcheck_goodfor good links..rs_linkcheck_badfor bad links..rs_linkcheck_dupefor links that have already been checked..rs_linkcheck_linkedis the span tags that wrap the text that was parsed into links. - The checked links info box has an ID so you can style it differently.
I used this to set the font size...#rs_linkcheck_info { font-size: 8pt; } - The preference manager box has it's own style sheet as well.
If you need to you can set the size in that with something like this...#lc_preferencesBox { font-size: 10pt; }.lc_preferencesInput { font-size: 8pt !important; font-family: monospace !important; }
It is sometimes necessary to use!importantas in the example.
Installation
This is a Greasemonkey user script. It relies on functions specific to Greasemonkey.
To install in Firefox; Install the Greasemonkey extension
To install in SeaMonkey; Install the Greasemonkey-Mod extension
Make sure the Monkey is smiling then click the Install this script link.
See also: Greasemonkey Manual: Installing Scripts.
To uninstall go to:
Tools -> Greasemonkey -> Manage User Scripts...,
Select RS_LinkCheck,
Check "Also uninstall associated preferences",
Then click Uninstall.
See also: Greasemonkey Manual: Manage Dialog
And also: The Monkey Menu
To update this script just Install the script again - no need to uninstall.
Note: Anytime you install a script, it goes to the bottom of your list. You can, however, drag it back up towards the top in the Manage Dialog.
Notes
Version 1.0 first uploaded on November 8, 2007
Nothing happens when you press Shift+R?
I have noticed that sometimes nothing happens - you need to click on the page somewhere, especially if you have just used a menu item. This isn't a bug, it's just because focus moved off of the page and you need to move it back. Tab works too.
If it still doesn't work try changing the key or adding a modifier, see The Preference Manager below. It's also possible that it's not finding any RS links on the page.
Duplicate links are not checked
If a link has been checked or is already being checked, it is simply marked as a duplicate. I want to know which links are duplicates, and I thought it better to not bother with checking them (even though the browser probably caches the link status).
Also, these duplicate links are not added to the total count.
Link checking limit and delay
If you hit a number of bad RS links, the script may stop working. I believe they have a "max requests per second" setting and I don't know what the number is. If you run into this problem, wait for them to unblock you (try opening a RS link), try changing the limit and delay, and make sure you wait for all the links to be checked before checking the next batch. The script is not idiot proof, that's too much work for me.
Error pages and "link status unknown"
The script doesn't check why the file is not found, because frankly, I didn't expect to be able to and I really don't care anyway. However when I checked for responseText it seems part of the error pages are returned anyway.
This means that every bad link downloads 3570 bytes (need to verify the exact number), which is fairly insignificant.
Navigation Bar links
If you have a Site Navigation Bar, as in SeaMonkey, you can look under More -> rs_linkcheck for info on the number of links checked, and also a link to this page rs_linkcheck -> RS_LinkCheck - help page. I noticed that in SeaMonkey this menu item doesn't update unless you switch tabs back and forth. Link toolbar items are added but not updated or removed until the tab is changed.
The Preference Manager
The preferences are never stored until you hit the Apply button. The script looks for them every time a page loads (no way to avoid that except to disable it in the script), but if they aren't set the script's defaults are used.
You shouldn't need to reload the page after changing your preferences, however some items won't update to reflect those changes if you don't, such as the link limit message or a second tab using the same script.
The key stored in the browser config is the Unicode value of the charCode, a number, not the key letter itself.
The modifiers apply to all keys, I think that's obvious.
Hey! If you forget which key-combo you picked, just open the Preference Manager and then click on Cancel.
Be careful which key combo you pick, that they aren't used for something else. For example Ctrl+Shift+R will reload the page, so you wouldn't want to use that combo.
Debug mode
This script has a "debug mode" that can be used to diagnose problems. Messages are written to the JavaScript Error Console, and can easily be turned on and off.
The debug mode option shows up in the preference manager, and if you enable it, then the next time you press a key it will write a whole bunch of messages to the Error Console. These messages may not be helpful if you are not familiar with the script, but odd messages might clue me in to a problem. I wouldn't use this on a page containing a large number of links!
This preference is not saved, so when you reload it defaults to off. It can be permanently enabled by editing the script.
Disable this script?
I tried to make this script do as little as possible when it's not being used.
Still, it has to do some and the code is loaded on every page.
I would suggest limiting the included sites or disabling the script when it isn't needed.
Beware: Automat1kkk exposed a problem with having other "Link Checking" scripts enabled. As I mentioned above, when you install a script it goes to the bottom of your list, so if you have a lot of scripts you may not see this one or mistake another one for this script. You should disable or uninstall scripts you don't use, including this one (see Installation above).
Secret feature...
If you add the file protocol (file:///*) to the included sites, then open a text list of URLs, this script will convert all HTTP URLs to active links, and check all RS links.
Internet Download Manager
If you use IDM this script may cause the IDM download dialog to pop-up. In that case there is an option in IDM...
Don't start downloading from the following sites
Add the site: http://rapidshare.com/files/*
Also add "RAR" in the file types, and any other types you want such as "ZIP", so that when you click the link the IDM dialogue window will open up.
RS members should not need to disable direct downloads to use this script.
Thanks to rohanmishra for helping me solve this problem.
You don't need to edit this script
More importantly: You don't need to upload this script to edit it. If you want "smileys" you can simply use Stylish as I mentioned above. If it doesn't work for you then ask someone. Stylish 0.5.5 also works with SeaMonkey.
Here is the code to change the + to smileys using Stylish.
.rs_linkcheck_good:after { content: " :)" !important; }
.rs_linkcheck_bad:after { content: " :(" !important; }
Note the use of !important which is often necessary (see stylish Known issues).
I tested this and it works. It will continue to work if you re-install this script, and I won't change the class names. If you edit this script then any updates I make will erase what you did.
If you want to edit it, then make a copy and change the @name and @namespace, that's all I ask, well, credit is always nice.
Thanks. I think I'll quit typing in this box.
|
|
@ocen: you are right, I discovered that if you save "Webpage Complete", all files and images, then it saves the rendered content, the "WYSIWYG" source. Sorry I didn't know this. I will change it so that nothing is added until you press a key, this annoys me too. If you save "HTML only" then you get the original page. @xpi: I can do that, probably a good idea since the ".html" is never necessary. Sorry I have been away, but I'll see if I can get back to it soon. I have added some for parsing more link hiding servers, and lix.in requires image verification now. Uploaders Please don't use lix.in. |
|
|
please add an option to remove .html from
http://rapidshare.com/files/123/test.rar.html
thanks |
|
|
Please consider adding a source-editable switch to disable this script's hotkeys. I think if you change the key to "00" that will effectively disable it. But if you do decide to use images... They can mess up the page layout, but there is no need for me to add images to the script... |
|
|
Don't mind me... apparently I've had a psychotic break. The nifty GIF animation isn't generated by your script. But if you do decide to use images.... :-D |
|
|
* edit: Feel your == Feed your |
|
|
Instead of using free image hosting I strongly recommend you use base64 data URI to embed your TINY images in the userscript itself Feel your image URLs to this webby application
and be SURE to tick base64 instead of .. img src="http://http://i32.tinypic.com/t0rbcx.gif" .. you'll have .. img src="data:image/gif;base64,R0lGODlhG" .. ^^ truncated for brevity |
|
|
Please consider adding a source-editable switch to disable this script's hotkeys. |
|
|
@ocen, I am using Mozilla SeaMonkey.
Are those both the same, or different. Either way, there is nothing I can do. |
|
|
hello again mr.Descriptor. are you using firefox? or opera?
an example open www.google.com.tr and File > Save As
I hope now u can understand.. |
|
|
You are saying this script changed the html source? Greasemonkey scripts cannot change the html source. Every Mozilla browser I have ever used always saves the original HTML source. JavaScript changes the DOM, not the HTML source.
(I have not used Firefox 2, and have no plans to). |
|
|
hello mr.Descriptor I was small request from u.. when I check rapidshare link on any page. and after I want to save page as html.. but Rs_linkcheck script add self on code... Like
and more... can u check this please... check any link on the page then Save As page as html.. then u will see what I mean.. sorry for my english</style> |
|
|
Spam - another good reason to take my scripts off this site. |
|
|
A rapidshare search engine : http://www.rsfind.com , it's the most powerful and easy to use. All files of the search result is check weekly. |
|
|
A rapidshare search engine : http://www.rsfind.com , it's the most powerful and easy to use. All files of the search result is check weekly. |
|
|
Version 2.3
|
|
|
Just check Alt or Ctrl (or Meta) or both.
|
|
|
Hi there. I've just installed your scripts. But it's not working, which I believe is the side effect of one of the extensions I'm using, which starts my findbar upon any key press. I was just wondering if you could add a menu entry in the preference, which would trigger the link-check instead of a key press. This would probably be a nice work-around for users like me who cant live without a few extensions. Thanks again for your wonderful script. |
|
|
@zxc
|
|
|
ok, ok I see it now.
|
|
|
I suppose the more I type above, the more users refuse to read what I write, read the above!
|
|
|
well, it was called RS_LinkCheck and I installed it about 4-5 months ago from this page. It worked until this Monday (when it started to show "undefined" next to all links) - I saw green "found/not fund" text next to every link automatically when open the tab. It was very convenient as I work on multiply tabs with single links.
|
|
|
My script never did that, and if you tried you could easily end up getting blocked.
|
|
|
I want the script the check links AUTOMATICALLY, like the old one did. Is it possible? |
|
|
Version 2.2 Bug fix: Changing the link checking limit would sometimes not allow you to check links unless you reloaded the page. |
|
|
Version 2.2
@electBlake - Glad you like it, I only upload this for you people so an occasional comment is nice. Here comes more documentation... |
You could comment on this script if you were logged in.
