Getting rid of pop-ups on free sites.

We have researched for a period how to get rid of those annoying THINGS on free web sites. From Geocities ad square to several others. These solutions should work.

Before you read further, remember: Subverting a Free Webspace Provider's popups or other gratuitious adverspamming may be against the TOS, and as such, they reserve the right to boot your ass out and delete your page if they catch you doing it! While many are thick-headed enough not to waste their precious brain-time worrying about it, this is a public page, so even the FWPs themselves can (and a couple do!) read up on every method detailed below. Consider these a "temporary" fix to keep an FWPs popup from annoying your visitors while you redirect them to your site's NEW location (when a greedy FWP puts that kind of shit on your page, you move out of course!) In other words, you should be putting this on your replacement "My page has moved!" signpost pages, not your actual homepage

Part 1 Pop-ups

Angelfire

This could be what we've all been waiting for. Instead of provider-specific solutions, a single popup-killer script that works on every free webpage provider without modifications! The premise of what has been dubbed the SuperScript is that JavaScript functions can be redefined, particularly the window.open function.
 
 
Key:  
Black is your normal HTML  
Red is the server-included popup code 
Blue is the workaround or pop-up removal 
Green is something in the script you have to change/delete/modify 
 

Basic SuperScript
 
<html> 
<SCRIPT LANGUAGE="JavaScript"> 
<!-- 
function open() {return true;} 
//--> 
</SCRIPT> 
<head> 
...
This is the simple version of the SuperScript, for those who do not open their own windows. (If you use window.open() for your own purposes, scroll down a bit for the enhanced SuperScript.) This script can be put anywhere before the FWP's popup code. For HTML purity reasons it's best to leave it within the <HTML></HTML> tags, but on some FWPs where the popup code is inserted directly after <HTML> (ahem, Tripod) you will have to move it to the very beginning of the file, before <HTML>.
The basic SuperScript was gotten from Pop Up Ads Must Die, which got it from JohnC. (Why didn't we think of this one before?)
 
Advanced SuperScript
 
<html> 
<SCRIPT> 
  <!-- 
  function ScreenIt(url,name,parm){ 
      if(url.indexOf("popup.html")!=-1) return false; 
      return window.Xopen(url,name,parm); 
  } 
  window.Xopen=window.open; 
  window.open=ScreenIt; 
  //--> 
  </SCRIPT> 
<head> 
...

This is intended for those who use JavaScript window.open() in their own scripts, and only want it to be disabled specifically for the FWP. Like the previous script, this must be put before the FWP's popup code in order to work properly. This script looks to see whether the popup is from the site author (good) or from the FWP (bad)...if it's an FWP popup it is screened out. Change popup.html to any partial word/phrase/etc. that appears in the FWP popup's URL (they often have the word "pop" in the URL...use that...and just as often, there is a "?" in their popup URL somewhere...since normal webpage URLs never contain a "?", that's a very good way for the script to tell the popup came from the FWP!)...any popup whose URL contains that phrase will be screened out, and ones with URLs not containing it will be allowed through. This script can also be easily modified to allow popups with specific things in their URLs (such as "mygoodpopup.html") and block all others--useful for FWPs who like to change their popup's URL every two days :)
 

GeoCities

 Getting Rid of the GeoCities Watermark AdSquare

GeoCities, the FWP everyone loves to hate, has officially dropped its watermark and popups for a new cash cow, called the AdSquare. Like the evil Watermark, it is a DHTML monstrosity that uses Cascading Style Sheets to embed a flickering Yahoo ad in the upper-right corner of your page. Conventional Wisdom states that this ad is poised to become even more heavily animated in the not-too-distant future, and begin floating around the screen in much the same manner as the Watermark. Unlike the Watermark, however, viewers will be able to remove the ad from a single page by clicking a "close" button on the ad itself and view portions of the page that may be underneath it.

To get rid of the ad, make the following modifications at the end of your homepage:
 
...
</body>
</HTML>

<noscript><table bgColor="#ffffff"><td><font color="#ffffff"><plaintext>
...

Key:
Black represents your page's existing HTML code (don't need to change it)
Blue represents the "subversion" code to add to your page.
Red represents the server's ad-code garbage, which you want to eliminate using the blue code.
Green represents something to change--change the table/text colour to match the background of your page (for IE users)

This will tell the browser that all the GeoCrap tacked on is meant to be viewed as text (not run as a Javascript), and hides all this stuff in an unclosed table definition (meaning it will be invisible to users of Netscape and other REAL browsers). If they use IE, the AdSquare code will appear at the bottom with the same colour as your page's background. If you use a background graphic on your page, see below. Remember, there's no such thing as </plaintext>!

Kirk writes in with the following code for those with a background graphic:
 
...
</body>
</HTML>

<noscript><table background="pic name.jpg"><td><font color="#ffffff"><plaintext>
...

No guarantees that it'll line up perfectly, but your background graphic will appear at the end of the page instead of a white square (IE users).

(If you find a browser that doesn't like this code for some reason, please let me know...)

Tripod

The Tripod code has changed again. It's sneakier! Anyway, here's a way to beat it.
...
<HTML>
<script language="JavaScript"> 
<!--
var popupName="TripodPopup";
var popup = window.open("", popupName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=100,height=100');
// popup.location = "http://www.cexx.org/parking.htm?PlopsSuck";
popup.close();
// -->
</script>

...

The code is a little strange--in order to close their named popup, you first must rename it to the same thing, re-open it over the existing window, then close it. A strange variation on the Hijacking technique, but it works. The commented green line is a little experiment I'm trying--if you uncomment this line (remove the //) and comment out the popup.close(); below it, the popup will load a "Free Popup Parking" page from my server. Aside from being an ad-free URL to load for hijacked popups, the popup-parking page will (if I get around to it) allow me to keep a rough guesstimate of how many total popups this code has killed. Maybe I'll put a McDonalds-esque counter around here somewhere, "Over ##### popups nuked" :)
PS: Anything after "?" on the parking code doesn't do anything useful, and is fair game for inserting your own text/messages

WebJump

The unique thing about Webjump's popup is that it appears behind the main browser window instead of on top like most popups. There it quietly sits, waiting to ambush the hapless surfer when he/she closes the browser's main window. For the record, every popup requires the surfer to interact with the ad; there is no such thing as a passive popup. While Webjump asserts it's just to annoy visitors less, it seems like the "passive popup" is more an effort to keep people from pinning it on them as the popup offender....it's pretty much the equivalent of farting in a crowded room.

The Webjunk..er, Webjump "passive popup" is particularly nasty in that it is loaded via a separate frameset, so its JavaScript code cannot be acted upon directly. Like the Digiweb and Spaceports popups, the popup window must be hijacked when it appears.
... your page's HTML here ... 
<script language="JavaScript">
<!--
var timing=0;
var newpage="protest.htm";
var wndname="po"+"pWind"+"ow";
window.onError=null;
tasteful=window.open(newpage,wndname,"height=400,width=400,scrollbars=yes");
andStayOut();

function andStayOut(){
  timing++;
  if (tasteful!=null){
    // tasteful.close();
    if (tasteful.location.href!=newpage){
      tasteful.location.href=newpage;
    }
  } else {
  if(timing<120) setTimeout("andStayOut()",1000);
  }
}
// -->
</script>
... your page's HTML here ...

Some notes on the Webjump anti-popup script:

Part 2 Getting Rid of Ad Frames

AdFrames are frames that appear on free webpages and serve a neverending stream of banners and crap, and can't be scrolled off-screen. AdFrames on free webpage providers are insidious in that they are embedded in not the page but the browser window itself, latching on like little parasites and coming along for the ride for as long as that browser window remains open. Even if you surf off the ad-laden site in search of greener pastures, SURPRISE! The constantly-reloading adframe tags along and forces ads onto any other sites you surf in that window, above and beyond all the ads that already litter the new page.

Getting rid of adframes Anywhere

Hijacking a FWP's Advertising Popup
 
Some FWPs now are inserting their popup ads into members' pages in such a way that they can't be foiled with <noscript> tags or other tried-and-true popup ad killers (e.g. they are putting the code at the top of the page). If you can't keep the popup window from appearing, you still might be able to use JavaScript to hijack their window. Then you can change the popup's title, size, window contents... here's how.
 
A popup ad is always opened with JavaScript in the following form:
There's probably a lot of other stuff in the popup code, but this is the critical line to watch for, the one that actually defines the popup and makes it appear. The part we're especially concerned with here is the "windowname" section. This tells the browser the name of the window being opened. FWPs are usually dumb and call it something obvious like "adWindow" or "popup". (If they're smart, they have something that's random and changes all the time, like TSw8092358 or something to that effect. If so, you're sh** outta luck.) If you use another window.open(...) line to open another window with the same name, it will actually just load into the existing one, since the window with this name is already there and you can't have two windows with the exact same name. All you have to do then, is use a script like this:
<script language="JavaScript">   
<!-- 
var winname1="adw";   
var winname2="indow";   
var windowname=winname1+winname2;   
arbitrary = window.open("replacement.htm", windowname, 
"toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=no,width=530,height=230");    
// arbitrary.close();  //Uncomment this statement to make the popup window go bye-bye :) 
// --> 
</script> 
Notice the winname1/winname2 part at the beginning, this splits up the windowname so that if the FWP searches for it (looking for scripts like this, most likely) they won't find it. Take whatever name the FWP has for its popup, put the first half of it in for winname1 and the 2nd half for winname2. Also note the 3rd parameter of the window.open, it contains a list of attributes for the popup such as size and scrollability. By changing these you can make the popup any size you want, and other useful things. Remember that as long as your provider has unpreventable popups you have to put the popup replacement page on a different (pop-free) server, otherwise you will get even more popups! A good way to go, if you don't have access to a pop-free account and your ISP doesn't give you webspace, is sign up somewhere that lets you place a banner on your page instead of popups (Virtualave, Fortunecity), put the banner way at the bottom of your replacement page and make the popup window small enough (and non-scrolling) that the banner at the bottom is offscreen and never shows.
 
Oh, the the possibilities! <sinister laughter> You can make it into an anti-popup protest page, parody ads, a "this provider sucks" window telling everyone how they've violated your beautyful page with popup ads...be creative! Some other cool things to do with a repossessed popup window include

 

 

Back to Atlantic Canada Info

Back to Viking Web Design