Post Reply 
Facebook Ads
Sep. 29, 2011, 05:25 PM
Post: #1
Facebook Ads
Given Joe's response to the "facebook ticker" thread, I've located the following userstyle to thwart facebook ads:
------------------------------------------------------------------

@-moz-document domain("facebook.com") {


.ad_capsule{ display: none !important; }
#ssponsor{ display: none !important; }
.nextstep{ display: none !important; }
.sponsors { display: none !important }
.invitefriends { display: none !important; }
.social_ad { display: none !important; }
#sidebar_ads { display: none !important; }
.sponsor { display: none !important; }
#feedwall_with_composer, #info_tab { width: 722px !important; margin-left: -180px; }
.story_content { width: 660px !important; }
.story_body {width: 665px !important; }
.photos_tab { width: 945px !important; }
.emu_sponsor,.house_sponsor { display: none !important; }

/* Block sidebar ads (+1.72 - 2009-02-20) */
.from_friend_story {width: 725px !important; }
.UIHomeBox_Sponsored, .profile_sidebar_ads { display: none !important; }

/* Hide sponsor from the home page (+1.74 - 2010-11-01) */
#home_sponsor_nile{ display: none !important; }

/* Block sidebar ads again and hide ads from the photo overlay as well (+1.75 - 2011-05-19) */
#pagelet_ego_pane { display: none !important; }
.fbPhotoTheaterGrid .adsContainer { display: none !important; }

-----------------------------------------------------------------

The script works perfectly. Does this give some clue how filters might be written to block the ads with Proxomitron?

Thank you,

Cary
Add Thank You Quote this message in a reply
Sep. 30, 2011, 03:50 AM
Post: #2
RE: Facebook Ads
We can't use "@-moz-document domain("facebook.com") ". The rest looks like css.

Code:
[Patterns]
Name = "facebook css test 11/09/29"
Active = TRUE
URL = "$TYPE(htm)www.facebook.com/"
Limit = 256
Match = "(^(^</head>))$STOP()"
Replace = "<style>"
          ".ad_capsule{ display: none !important; }"
          "#ssponsor{ display: none !important; }"
          ".nextstep{ display: none !important; }"
          ".sponsors { display: none !important; } "
          ".invitefriends { display: none !important; }"
          ".social_ad { display: none !important; }"
          "#sidebar_ads { display: none !important; }"
          ".sponsor { display: none !important; }"
          "#feedwall_with_composer, #info_tab { width: 722px !important; margin-left: -180px; }"
          ".story_content { width: 660px !important; }"
          ".story_body {width: 665px !important; }"
          ".photos_tab { width: 945px !important; }"
          ".emu_sponsor,.house_sponsor { display: none !important; }"
          ".from_friend_story {width: 725px !important; }"
          ".UIHomeBox_Sponsored, .profile_sidebar_ads { display: none !important; }"
          "#home_sponsor_nile{ display: none !important; }"
          "#pagelet_ego_pane { display: none !important; }"
          ".fbPhotoTheaterGrid .adsContainer { display: none !important; }"
          "</style>"

Anything?

HTH
Add Thank You Quote this message in a reply
Sep. 30, 2011, 04:25 AM
Post: #3
RE: Facebook Ads
I pasted it into Web Page Filters and made sure it was activated. It's not working, but thank you very much for trying. Smile!
Add Thank You Quote this message in a reply
Sep. 30, 2011, 01:51 PM
Post: #4
RE: Facebook Ads
(Sep. 30, 2011 04:25 AM)Belarathon Wrote:  It's not working

Are you sure?
div#pagelet_ego_pane on the "Wall" is hidden after activating the filter. This would be the "Sponsored See all" ads in the right column.
Add Thank You Quote this message in a reply
Sep. 30, 2011, 02:05 PM
Post: #5
RE: Facebook Ads
Works here JJoe although I found if I click a link and then go back to page that ticker appears again ! If you refresh page it goes away

Kind Regards

Scoop
Add Thank You Quote this message in a reply
Oct. 01, 2011, 09:50 PM
Post: #6
RE: Facebook Ads
Quote:Are you sure?
div#pagelet_ego_pane on the "Wall" is hidden after activating the filter. This would be the "Sponsored See all" ads in the right column.

That's what I thought it would do, but they are still there, using Firefox, Chrome, and Opera. The "ticker" filter doesn't work either. Would I necessarily have to have the rest of the Sidki filterset installed?
Add Thank You Quote this message in a reply
Oct. 02, 2011, 02:47 AM
Post: #7
RE: Facebook Ads
(Oct. 01, 2011 09:50 PM)Belarathon Wrote:  Would I necessarily have to have the rest of the Sidki filterset installed?

I don't think so.

The filters need access to the tags that they are testing for, </head> and </body>. Other filters can hide tags.

The (^(^)) form can miss but should be ok here.

Your facebook page's address needs to start with www.facebook.com/

First, verify that the filters added the code to the html.

And remember that I'm shooting in the dark.
I did forget to add type="text/css" to the style tag but...

@ Scoop's
Interesting, sounds like the script only works while loading the page.

HTH
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: