Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sponsored has been added to ALL news stories

About: Facebook unsponsored

Facebook have added "Sponsored" (including the invisible 'S' characters) into all the news feed stories. In non-Sponsored stories the text is in a 0x0 pixel box so it's not visible, but the script removes ALL stories now.

Comments

  • Replace the selectors at lines 31-36 which were:

        'selector': [
            'div[id^=feed_subtitle] > span > div > div > a > div',
            'div[id^=feed_subtitle] > span > a > div',
            'a.uiStreamSponsoredLink',
            'a[rel=dialog-post] > span > span'
        ],
    

    with this:

        'selector': [
            'div[id^=feed-subtitle] > span > a > div',
            'div[id^=feed-subtitle] > span > div > div > a > div',
            'div[id^=feed-subtitle] > span > a > div',
            'div[id^=feed-subtitle] > span > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > span > div > div > div > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > div > div > div > div > div > a > span',
            'div[id^=feed-subtitle] > s > div > div > div > div > div > div > div > div > div > a > span',
            'a.uiStreamSponsoredLink',
            'a[rel=dialog-post] > span > span'
        ],
    

    Replace line 413 which was:

                            if(searchedNodes[typeIterator].content[targetIterator] == comparisonString) {
    

    with this:

                            if(searchedNodes[typeIterator].content[targetIterator] == comparisonString && nodes[nodeIterator].offsetParent != null) {
    

    The line 413 change fixes the issue with all stories having a hidden Sponsored tag. The updated selectors are because FB changed the selectors and nested things inside many divs, spans, and s tags.

  • this one isn't working anymore )-:

  • GwiGwi
    edited November 15 Vivaldi

    Hello mine wasn't working either after your change : the id seems to have changed from feed-subtitle to feed_subtitle.

    So with your changes and modyfing feed-subtitle to feed_subtitle in the selector array results in a working script for me (on Vivaldi browser).

  • The id changed from feed_subtitle to feed-subtitle a few weeks ago... maybe they're using a mixture of both? The code is working for me still with feed-subtitle. Maybe we need to duplicate the selectors and have both the feed_subtitle and feed-subtitle variants. Duplicate all the lines that contain div[id^=feed-subtitle] and change the duplicates to read div[id^=feed_subtitle]

    I wish regular expressions worked in selectors.

  • Now they've changed to feed_sub_title. Update your selectors again... geez. Must be nice to have your programmers do completely unconstructive garbage such as this.

  • edited December 2 Firefox

    These changes do not appear to work with Firefox/Greasemonkey. However, they do work Firefox/Tampermonkey.

  • Thanks kjp for the fix. It does seem to work on Safari/Tampermonkey.

  • this div[id^=feed_subtitle] seems to work. sometimes the sponsored post hangs around for a few seconds before it disappears.

  • unedited script ( fresh install) in Firefox works perfectly.....on two computers woohoo!

Sign In or Register to comment.