Home
Up
fire
Historia
latropa
Noticias
photos
Enlaces
Favorites
el lado oscuro
asuntos
El_Tiempo


Popup-killing SuperScript
 
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 :)