Secure Rapidshare and Megaupload download using https

By Spir Last update May 19, 2009 — Installed 1,167 times. Daily Installs: 1, 1, 2, 0, 2, 3, 1, 2, 1, 3, 1, 0, 4, 2, 10, 3, 5, 5, 2, 1, 3, 3, 4, 1, 1, 5, 0, 0, 0, 1, 4, 0

There are 6 previous versions of this script.

// ==UserScript==
// @name           Secure Rapidshare and Megaupload download using https
// @namespace      none
// @description    Transforms all Rapidshare & Megaupload link from http to https
// @include        *
// ==/UserScript==
for (var i = 0; i < document.links.length; i++) {
	
	var tmp_link = String(document.links[i]);

	if (tmp_link.match("rapidshare\.com")) {
		if (document.links[i].protocol == 'http:')
			document.links[i].protocol = 'https:';
	}

	/*
	if (tmp_link.match("megaupload\.com")) {
		if (document.links[i].protocol == 'http:')
			document.links[i].protocol = 'https:';
	}
	*/
}