Projects

Scripts

Other

PXE

edit SideBar

HotspotNoAd

This is a greasemonkey script that will remove the ads/banner from the top of most pages when your using Hotspot Shield. Hotspot Shield is a free VPN/Proxy service that allows your to have a encrypted session when your on a public wi-fi network.

You can find my userscripts.org posting of this tool here: http://userscripts.org/scripts/show/49307

// ==UserScript==
// @name           Hotspot Shield ad remove
// @namespace      
// @description    Removes Hotspot Shield's Ad banner from every page.
// @include        http://*
// @include        https://*
// @include        file:*
// @copyright      Winter Faulk
// @version        1.1
// @license        Creative Commons Attribution-Noncommercial 3.0 United States License
// ==/UserScript==

// Thanks to Leo Janeway (http://userscripts.org/users/64553) for some changes/fixes

function remove_ad()
{
	var allDIVTags = new Array();
	var allDIVTags=document.getElementsByTagName("div");

	var pattern1 = new RegExp("(^[a-zA-Z]{1,4}[0-9]{1,3}$)");
	var pattern2 = new RegExp("(^[a-zA-Z]{1,3}_\a\l\l[0-9]{1,3}$)");
	for (i=0; i<allDIVTags.length; i++)
	{
		if (pattern1.test(allDIVTags[i].id) && allDIVTags[i].style.display != "none" && pattern2.test(allDIVTags[i].className))
		{
			allDIVTags[i].parentNode.removeChild(allDIVTags[i]);
			document.getElementsByTagName('html')[0].style.marginTop='0';
			i = allDIVTags.length+1
			return true;
		}
	}
	return false;
}


remove_ad();
Page last modified on August 21, 2009, at 04:19 PM EST
img cache