Facebook news feed "sponsored" posts

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
STR8_AN94BALLER
Posts: 43
Joined: Fri Aug 14, 2015 7:41 am

Re: Facebook's Plan to Block Ad-Blockers?

Post by STR8_AN94BALLER »

mapx wrote:for now just update easylist, see if works.
The above comment about implementation is the possibility to have a new feature to fight better (FB will respond to the new easylist filters ...)

works yesterday, now borked again (easylist last updated 12 aug 2016 manually with ctrl t)
Derty
Posts: 33
Joined: Sun Jan 26, 2014 5:39 am

Re: Facebook's Plan to Block Ad-Blockers?

Post by Derty »

http://www.facebook.com##div[data-xt] and facebook.com###data-xt <- not working right now.

Updating filters seemed to do the trick.

× Activada EasyList Última actualización a las 16:30:28 de hoy
× Activada EasyPrivacy Última actualización a las 16:30:28 de hoy
× Activada Filtros Nauscopicos Última actualización a las 16:30:27 de hoy
× Activada Adware filters Última actualización a las 16:30:27 de hoy
× Activada Malware Domains Última actualización a las 16:30:28 de hoy
Last edited by Derty on Fri Aug 12, 2016 4:43 pm, edited 1 time in total.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Facebook's Plan to Block Ad-Blockers?

Post by mapx »

Did you update easylist right now ?
https://hg.adblockplus.org/easylist/rev/6fa8cf0bde54
Derty
Posts: 33
Joined: Sun Jan 26, 2014 5:39 am

Re: Facebook's Plan to Block Ad-Blockers?

Post by Derty »

mapx wrote:Did you update easylist right now ?
https://hg.adblockplus.org/easylist/rev/6fa8cf0bde54
Sorry I dind't prior to post, my fault. Seemed to work, so I edited my last post.
STR8_AN94BALLER
Posts: 43
Joined: Fri Aug 14, 2015 7:41 am

Re: Facebook's Plan to Block Ad-Blockers?

Post by STR8_AN94BALLER »

mapx wrote:Did you update easylist right now ?
https://hg.adblockplus.org/easylist/rev/6fa8cf0bde54

Ad amount greatly reduced, now only appears if you scroll extensively through the website.

I cant attach picture without stretching the forum size, so I link instead.
https://i.imgur.com/9Rqk5CK.png
Last edited by STR8_AN94BALLER on Fri Aug 12, 2016 5:06 pm, edited 1 time in total.
Derty
Posts: 33
Joined: Sun Jan 26, 2014 5:39 am

Re: Facebook's Plan to Block Ad-Blockers?

Post by Derty »

Not working.

There is one thing I don't get.

I have 'Web developer' addon installed on my Chrome.

I can select the exact <div>, and then 'Hide' or 'Remove' it. I can even copy the entire <div>. So, if web developer can erase it, how couldn't anybody write a simple script to find the div and block it?

If you see FB Suggested Post Killer, by Eric Mintz, you can see what he is searching for, in order to block it :

Code: Select all

(function() {
    'use strict';

    // I predict FB will change this classname from time to time.
    // ... so I have it in an easy-to-access variable here at the top.

    // -----------------------------
    // -- change me as needed
    // -----------------------------
    var divClass="_5jmm _5pat _3lb4 _59m _x72";
    // -----------------------------

    // Your code here...
    var addListener = function(element,eventName,listener){
        if(element.addEventListener){
            element.addEventListener(eventName, listener);
        }else{
            element.attachEvent('on'+eventName, listener);
        }
    };
    var killads = function(){
        var divs = document.getElementsByClassName(divClass);
        for (var i = 0; i < divs.length; i++){
            var spans = divs[i].getElementsByTagName('span');
            if (spans.length > 0 && spans[0].innerHTML == "Publicación sugerida"){
                divs[i].remove();
            }
        }
    };
    addListener(document,'load',killads);
    addListener(document,'DOMNodeInserted',killads);
})();
I've changed DivClass and innerHTML to mach the ones I've found in my own facebook.

OK, it's not working, and I've posted about it in author's webpage, but I'm sure his approach has some sense. The only thing you have to match is how can Web Developer delete or hide the ad.

I hope any of this could be useful to anybody.


###EDIT###

You can add these ones :
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“5”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“6”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“7”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“8”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“9”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“1”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“2”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“3”]
facebook.com##DIV[id^=“hyperfeed_”]._5jmm[data-dedupekey^=“4”]

And you'll see no ads, but you can't see the name of the people in a post, in the upper part, near his profile pic. Nice one by now.

Ok they show up, but then they dissapear.
Last edited by Derty on Sun Aug 14, 2016 9:50 pm, edited 1 time in total.
sucrat
Posts: 5
Joined: Wed Aug 10, 2016 11:37 pm

Re: Facebook's Plan to Block Ad-Blockers?

Post by sucrat »

Hi all,
This is the only filter that stops but you have to have the right numbers
#*(u_jsonp_2_1) ....
it would take regular expressions
:cry:
sucrat
Posts: 5
Joined: Wed Aug 10, 2016 11:37 pm

Re: Facebook's Plan to Block Ad-Blockers?

Post by sucrat »

not work for me
User avatar
sattanclaus
Posts: 7
Joined: Tue Aug 16, 2016 3:57 pm

Re: Facebook news feed "sponsored" posts

Post by sattanclaus »

How about coding a function that removes a parent element based on the content of the child elements? For example, search for the text "Sponsored" and then entirely remove the wrapper?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Facebook news feed "sponsored" posts

Post by mapx »

solskido updated his script: https://greasyfork.org/en/scripts/22210 ... nsponsored
it works now in firefox too
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Facebook news feed "sponsored" posts

Post by mapx »

sattanclaus wrote:How about coding a function that removes a parent element based on the content of the child elements? For example, search for the text "Sponsored" and then entirely remove the wrapper?
already talked about:
forum/viewtopic.php?p=156915#p156915
User avatar
sattanclaus
Posts: 7
Joined: Tue Aug 16, 2016 3:57 pm

Re: Facebook news feed "sponsored" posts

Post by sattanclaus »

Anyway, this filter "facebook.com##[data-xt]" seems to work, at least temporarily. It seems that only sponsored posts have data-xt.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Facebook news feed "sponsored" posts

Post by mapx »

sattanclaus wrote:Anyway, this filter "facebook.com##[data-xt]" seems to work, at least temporarily. It seems that only sponsored posts have data-xt.
it works, but removes not only the sponsored posts so is risky
User avatar
sattanclaus
Posts: 7
Joined: Tue Aug 16, 2016 3:57 pm

Re: Facebook news feed "sponsored" posts

Post by sattanclaus »

mapx wrote:
sattanclaus wrote:Anyway, this filter "facebook.com##[data-xt]" seems to work, at least temporarily. It seems that only sponsored posts have data-xt.
it works, but removes not only the sponsored posts so is risky
Just analyzed 50 posts, and didn't find any non-sponsored post that uses data-xt attribute. This of course does not mean that it never happens, but the risk seems to be less than 2%. Among those 50 posts there were 6 sponsored ads.
Locked