Re: Annoying pop-up windows that SM/Multizilla doesn't seem to be blocking
Paul Hartman <[email protected]> Fri, 2 Oct 2009 10:42:46 -0500
| Newsgroups | gmane.comp.mozilla.multizilla |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Oct 2, 2009 at 3:23 AM, Raj Bhaskar <[email protected]> wrote: > I went to the URL provided and MultiZilla blocked a popup for me. > > If there's a nasty script coming from clicksor.net as Lewis suggests, > you could also block that in MultiZilla directly using the 'scripts' tab > of the Permission Manager. The externally-hosted ad stuff is blocked with AdblockPlus, the specific one I'm referring to is inline javascript, not loaded from an external host, so it can't be blocked (without blocking all javascript). It is the popurl function at the bottom of the page (I'm sure email will horrible mangle this, my apologies in advance): function popurl(url) { var popunder=new Array() popunder[0]=url; var p ='width=800,height=510,scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0'; var one_time=0 function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { // if the cookie exists offset += search.length end = document.cookie.indexOf(";", offset); // set the index of beginning value if (end == -1) // set the index of the end of cookie value end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function loadornot(){ if (get_cookie('popunder')==''){ load_pop_power() document.cookie="popunder=yes" } } function load_pop_power(){ win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p) win2.blur() window.focus() } if (one_time==0) load_pop_power() else loadornot() } And then: popurl('http://www.bharatstudent.com/study-abroad/studyabroad.php?refcode=Ziddu'); The page (the bharatstudent.com site in this case) is what opens automatically, without any user interaction. I've blacklisted both ziddu.com and bharatstudent.com from opening pop-ups, but it still happens to me. Yes, I could just disable javascript but I'm more curious about why this particular bit of code is able to bypass the pop-up suppression rules. Thanks, Paul