Post Reply 
annoying pop-up - could be the start of things to come?
Sep. 23, 2005, 05:22 AM
Post: #1
annoying pop-up - could be the start of things to come?
when I visited this page:
http://linux.sys-con.com/read/117904.htm
there is a pop-up that shows and advert for events upcoming. I can't figure out how to block this one.

Its a trivial thing at this point, but what if more web sites adopt this tactic?

The code for the popup is right at the bottom of the page and is as follows:
----
<style>
No_Ads_Allowed {
border: 8px ridge Black;
padding: 10px;
}
</style>

<div id="elementDiv" class="welcomemat" style="z-index: 1000; width:620; height:420; background-color:white; No_Ads_Allowed No_Ads_Allowed top:0; left:0; border-color:black;"><a href="http://www2.sys-con.com/events" target="new"><img src="http://res.sys-con.com/section/72/No_Ads_Allowed.gif" border=0>[/url]<div align="center"><a onclick="closeElement();">close this window[/url]</div></div>

<script>loadElement();</script>
-----

any ideas would be appreciated.
Quote this message in a reply
Sep. 23, 2005, 05:25 AM
Post: #2
code correction - sorry
sorry, 2nd try. the code below is the real code.

<style>
.welcomemat {
border: 8px ridge Black;
padding: 10px;
}
</style>

<div id="elementDiv" class="welcomemat" style="z-index: 1000; width:620; height:420; background-color:white; visibility:hidden; position:absolute; top:0; left:0; border-color:black;"><a href="http://www2.sys-con.com/events" target="new"><img src="http://res.sys-con.com/section/72/eventspopup.gif" border=0>[/url]<div align="center"><a onclick="closeElement();">close this window[/url]</div></div>

<script>loadElement();</script>
Quote this message in a reply
Sep. 23, 2005, 05:37 AM
Post: #3
 
Here you go:

Code:
[Patterns]
Name = "Sys-Con Ad Remover"
Active = TRUE
URL = "([^/]++.|)sys-con.com/"
Limit = 512
Match = "<div id="elementDiv" class="welcomemat"*</div></div>\s<script>loadElement();</script>"

Very quickly written filter, but it should do the job.

FYI, the "\s" matches spaces.

Please post again with your results Smile!

Thanks Eyes Closed Smile

BTW, the loadElement function is located in this file: http://linux.sys-con.com/common/syscon.js

It's an auto-centering DHTML code.
Visit this user's website
Add Thank You Quote this message in a reply
Sep. 23, 2005, 07:36 AM
Post: #4
 
The key element seems to me to be the anchor. Why would the Banner Blaster not kill it, if you added the host name in the href or the src to the host list, or the domain name to the keyword list?
Add Thank You Quote this message in a reply
Sep. 24, 2005, 04:15 AM (This post was last modified: Sep. 25, 2005 04:26 PM by Oddysey.)
Post: #5
 
Siamesecat;
Quote:The key element seems to me to be the anchor. Why would the Banner Blaster not kill it, if you added the host name in the href or the src to the host list, or the domain name to the keyword list?
Perhaps because what you propose would only replace the actual link itself, not the rest of the jizz that shows up on the screen.

What's really happening here is that no new window has been created, only the illusion of one. Look closely at the style for welcomemat - it defines an 8 pixel-wide border, which mimics the outside border of a browser window. When the loadElement script runs, the visibility attribute is changed from hidden to visible. And of course, the closeElement function merely returns that attribute to hidden.

So, if you kill only the link, you'll still see the border and the linked text to "close the window" (yet more disguise of what's happening). Kye-U's solution was to knock out the whole div, and that seems to be the ticket.

~!~!~!~!~!~!~!~!~!~!~!~
andy;

First, Welcome to the forums. Hope ya find the place useful, and stick around! Cheers
Quote:Its a trivial thing at this point, but what if more web sites adopt this tactic?
The answer to that can be best summed up in one word: vigilance. That means that you'll have to get hit once, and from then on, you can add that new style name/div id to a blocklist.

Or, you might look for styles that set an overly wide border and some kind of padding. Finding one such, you would then $SET a variable for that name, and knock out any div's found with that name. Might work, who knows? Shock

edit:
Seems to me that another clue might be the z-index set to equal 1000. Not very many good reasons to do that, other than to ensure that maximum annoyance value is reached in minimum time. Shame
/edit

Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Sep. 24, 2005, 06:11 AM
Post: #6
 
On that page, I saw indications of several JS ads, anchor-type ads, a SWFlash item, and a floating ad.
I did not actually see the ads, only little labels showing where they had been. The significant one is near the bottom, right? JD5000 wrote a filter for me to block floating ads. It kicked in on that page.
Code:
[Patterns]
Name = "Block: Floating Ads [JD5000]"
Active = TRUE
URL = "$TYPE(htm)(^$TST(keyword=*.(ads|adfloat).*))"
Bounds = "$NEST(<div,</div>)"
Limit = 2048
Match = "[^>]++ STYLE=$AV(*absolute*&&*width : [#315-650]*)"
        "&"
        "[^>]++ id=$AV(\2) "
        "&"
        "*<(i[fm]|ob|emb)*"
Replace = "<div id="Prox-\2" ></div>\r\n"
          "<span class=Prox style="display:$GET(displayS)">"
          "<a class=PrxLink title="Filter: Block: Floating Ads - \2" href="\u&keyword(.adfloat.)" >[Content Blocked][/url]"
          "</span>"
Add Thank You Quote this message in a reply
Sep. 26, 2005, 06:50 PM
Post: #7
 
Gosh! That's an entire network that uses that floating DIV. JD's filter works in the posted incarnation, not in the final one. If you're using his last alpha set, open the filter and replace "(^\h)" with "(^$TST(host))".

I'll play around a bit with blocking these DIVs as well.

Thanks for the heads-up!
sidki
Add Thank You Quote this message in a reply
Sep. 26, 2005, 08:26 PM
Post: #8
 
points out another "infatuation" with sidki's set - DATES in the title of the filter...

in reading this thread, I don't know if the filter included with JD's 10.14.04 alpha is the "final one", or if the 'posted incantation' is the 'latest and greatest'...

Siamesecat, which is "newer"?
Add Thank You Quote this message in a reply
Sep. 26, 2005, 09:57 PM
Post: #9
 
Thanks for the tips and info. I gave them a try. Siamesecat's filter seems to have done the trick.

At best I was only able to have the pop-up "pseudo-window" appear as a framed in blank section, and that as part of the original page, but appended at the very bottom of the page.

Excellent insight and suggestions. Thanks very kindly.
Quote this message in a reply
Sep. 26, 2005, 10:02 PM
Post: #10
 
And then again... After clearing the cache, restarting mozilla, and then reloading the page, the floating box appears again. At this point, its more of a puzzle to me than an annoyance. I'll keep playing with the filters some more.

Thanks again.
Quote this message in a reply
Sep. 26, 2005, 10:06 PM
Post: #11
 
Mine didn't work? Sad
Visit this user's website
Add Thank You Quote this message in a reply
Sep. 26, 2005, 10:30 PM
Post: #12
 
Kye-U:
No, sorry. Your filter didn't block it. :/

Siamesecat:
I rescind my last statement. Your filter DID indeed work. I typed it wrong. I tried it again with a copy and paste into my config file. Doh! Should've done that first. Smile!

It's all fixed up and working now.

Thanks sincerely everyone.
Quote this message in a reply
Sep. 27, 2005, 06:12 AM
Post: #13
 
Sidki,
Quote:JD's filter works in the posted incarnation, not in the final one. If you're using his last alpha set, open the filter and replace "(^\h)" with "(^$TST(host))".
I am not using a set of filters by JD. I use that filter because he posted it in this forum in answer to my question about blocking floating ads.

ProxRocks,
Quote:Siamesecat, which is "newer"?
I don't have a clue. See above.
Add Thank You Quote this message in a reply
Sep. 27, 2005, 01:38 PM
Post: #14
 
okay, to recap -

this is the filter as posted above by Siamesecat:
Code:
Name = "Block: Floating Ads [JD5000]"
Active = TRUE
URL = "$TYPE(htm)(^$TST(keyword=*.(ads|adfloat).*))"
Bounds = "$NEST(<div,</div>)"
Limit = 2048
Match = "[^>]++ STYLE=$AV(*absolute*&&*width : [#315-650]*)"
        "&"
        "[^>]++ id=$AV(\2) "
        "&"
        "*<(i[fm]|ob|emb)*"
Replace = "<div id="Prox-\2" ></div>\r\n"
          "<span class=Prox style="display:$GET(displayS)">"
          "<a class=PrxLink title="Filter: Block: Floating Ads - \2" href="\u&keyword(.adfloat.)" >[Content Blocked][/url]"
          "</span>"

this is the filter that JD posted on 9/30/04 at 1:19am (yes, it's the same as above):
Code:
Name = "Block: Floating Ads {8.d} [test]"
Active = TRUE
URL = "$TYPE(htm)(^$TST(keyword=*.(ads|adfloat).*))"
Bounds = "$NEST(<div,</div>)"
Limit = 2048
Match = "[^>]++ STYLE=$AV(*absolute*&&*width : [#315-650]*)"
        "&"
        "[^>]++ id=$AV(\2) "
        "&"
        "*<(i[fm]|ob|emb)*"
Replace = "<div id="Prox-\2" ></div>\r\n"
          "<span class=Prox style="display:$GET(displayS)">"
          "<a class=PrxLink title="Filter: Block: Floating Ads - \2" href="\u&keyword(.adfloat.)" >[Content Blocked][/url]"
          "</span>"

and THIS is the filter in JD's 10/14/04 alpha (ie, NEWER than 9/30/04):
Code:
Name = "Block: Floating Ads {8.d} [test]                        [jd]"
Active = TRUE
URL = "$TYPE(htm)(^$TST(keyword=*.(ads|adfloat).*))"
Bounds = "$NEST(<div,</div>)"
Limit = 2048
Match = "[^>]++ STYLE=$AV(*absolute*&&*width : [#315-650]*)"
        "&"
        "[^>]++ id=$AV(\2) "
        "&"
        "*(<(if|ob|emb|ma)|"
        "<a\s[^>]++href=$AV((http://(^\h)|javascript)*)*> <im)*"
Replace = "<div id="Prox-\2" ></div>\r\n"
          "<span class=Prox style="display:$GET(displayS)">"
          "<a class=PrxLink title="Filter: Block: Floating Ads - \2" href="\u&keyword(.adfloat.)" >&Omega;[/url]"
          "</span>"
and per sidki's excellent advice, should be updated to this, THE LATEST AND GREATEST:
Code:
Name = "Block: Floating Ads {8.d} [test]                        [jd] (modified)"
Active = TRUE
URL = "$TYPE(htm)(^$TST(keyword=*.(ads|adfloat).*))"
Bounds = "$NEST(<div,</div>)"
Limit = 2048
Match = "[^>]++ STYLE=$AV(*absolute*&&*width : [#315-650]*)"
        "&"
        "[^>]++ id=$AV(\2) "
        "&"
        "*(<(if|ob|emb|ma)|"
        "<a\s[^>]++href=$AV((http://(^$TST(host))|javascript)*)*> <im)*"
Replace = "<div id="Prox-\2" ></div>\r\n"
          "<span class=Prox style="display:$GET(displayS)">"
          "<a class=PrxLink title="Filter: Block: Floating Ads - \2" href="\u&keyword(.adfloat.)" >&Omega;[/url]"
          "</span>"

edit: I should add that sidki's config already prevents the floating ad that started this thread, the above is to assist those that use JD/Grypen configs to ensure the 'latest and greatest' floating ad filter...
Add Thank You Quote this message in a reply
Sep. 28, 2005, 06:04 AM
Post: #15
 
Code:
href="\u&keyword(.adfloat.)" >&Omega;[/url]"
What is the "Omega;" in the replacement? Is that what gets printed on the page? What was wrong with printing "[Content Blocked]"?
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: