facebook-adblock/facebook_adblock

Not working on Android

Closed this issue · 3 comments

Reported at https://addons.mozilla.org/en-US/firefox/addon/fb_ad_block/reviews/831578/. I've tried it and indeed sponsored posts are not hidden on Android

Just looked into facebook sponsored posts on Firefox for Android. Each post (normal and sponsored) is formed as an <article>. All <article> elements have a data-ft attribute. For example, for a sponsored post: (all reformatted)

{
    "mei": "%7B%226054776226758%22%3A%22AI%5Cu0040b1c022218a7d345a3428bd5dfcb4a4ba%22%2C%226043525097344%22%3A%22AI%5Cu00400f437370cfaa72847df69421353919fb%22%2C%226060440721685%22%3A%22AI%5Cu0040fc18e982880d8a06f18be80862adf341%22%2C%226058713143744%22%3A%22AI%5Cu00401406829db17c74ce252067b5cb77128c%22%2C%226055695861267%22%3A%22AI%5Cu0040fd680d5c6782eec734f467d5600a4929%22%2C%226053357843378%22%3A%22AI%5Cu00407e489f520ec9cc83a9854ddd785749a9%22%7D",
    "mf_story_key": "5826358374299468828",
    "qid": "6358407514629669422"
}

And for a normal post:

{
    "mf_story_key": "1749205373942510096",
    "qid": "6358398787207265282",
    "top_level_post_id": "1634609873231669"
}

The mei field of a sponsored post can be further reformatted as:

{ '6054776226758': 'AI@b1c022218a7d345a3428bd5dfcb4a4ba',
  '6043525097344': 'AI@0f437370cfaa72847df69421353919fb',
  '6060440721685': 'AI@fc18e982880d8a06f18be80862adf341',
  '6058713143744': 'AI@1406829db17c74ce252067b5cb77128c',
  '6055695861267': 'AI@fd680d5c6782eec734f467d5600a4929',
  '6053357843378': 'AI@7e489f520ec9cc83a9854ddd785749a9' }

There are 6 items. On the web page there are 6 cards in the sponsored post. Values like AI@b1c022218a7d345a3428bd5dfcb4a4ba corresponds to one of the 6 cards.

I guess checking mei in data-ft is a good way. I may be able to write a script for Firefox on Android, if I managed to send WIP extensions to the phone. Also, I didn't check it on Chrome.

I fixed the issue on mobile version since 1.1.4 by adding,
$("article.acw").remove();

Let me know if it's working.

It's working on Firefox, too. Thanks!