zbluebugz / facebook-clean-my-feeds

Clean up Facebook feeds by hiding sponsored, suggestions and other posts based on keywords.
GNU General Public License v3.0
114 stars 13 forks source link

[Request] - Event you may like hiding #14

Open thiendt2k1 opened 1 year ago

thiendt2k1 commented 1 year ago

I'd like the option to hide "event you may like" section, the HTML is below image HTML of the section: https://anotepad.com/notes/jsgpr33m My gratitude for your efforts

zbluebugz commented 1 year ago

Thanks for the positive feedback :-)

Will try and fit this request into the next release.

Is "Events you may like" showing up in the main News Feed? Groups Feed? Events feed? Other?

If I'm not able to get this feature to show up in my FB account, would you be willing to test the next version before I publish it?

thiendt2k1 commented 1 year ago

First, Thanks! Second:

zbluebugz commented 1 year ago

Can you test the following code for me, please.

In FB, scroll down until you see the "Events you may like" box.

Then in the DevTools window, choose the "Console" tab and run the following code.

(function testEventRules() {
    let container = 'span[id="ssrb_feed_start"] ~ * h3 ~ div';
    let branch = 'div:nth-of-type(2) > div > div >  h3 > span';

    let results = '';
    let queryHit = false;

    results = Array.from(document.querySelectorAll(container + ' ' + branch));
    if (results.length > 0) {
        results.forEach(result => {
            if (result.children.length === 0) {
                console.info('*** *** Query #1 works *** ***');
                queryHit = true;
            }
        });
    }

    results = Array.from(document.querySelectorAll(container + ' > ' + branch));
    if (results.length > 0) {
        results.forEach(result => {
            if (result.children.length === 0) {
                console.info('*** *** Query #2 works *** ***');
                queryHit = true;
            }
        });
    }

    if (queryHit === false) {
        console.info('*** *** The Queries did not find a matching structure *** ***')
    }
})();

Copy the results from the console - the results will show up in the console's "Info" tab and prefixed with " ".

thiendt2k1 commented 1 year ago

Sorry for the late reply but it disappear after 2 or 3 times showing yesterday, so i haven't been able to test, will send the result back once the "event" showing again image

zbluebugz commented 1 year ago

No worries - take your time.

I had detection code for it, but dropped it as I hadn't seen "Event you may like" feature for quite some time.

I have added new detection code (thanks for supplying the sample HTML structure) into the next version and will wait until I hear from you on which rule(s) worked.

P.S. I haven't figured out how to make this feature show up for me, hence me not able to test the new detection code (old code won't work due to change in HTML structure).

thiendt2k1 commented 1 year ago

it's over a month now and i got my first event post, and it says that the first one match image

zbluebugz commented 1 year ago

Thanks for the feedback.

Does the latest Clean My Feeds' (v4.11) script detect "Events you may like"?

thiendt2k1 commented 1 year ago

and today it's gone again :) these days fb is somehow trying to screw with my feed very often, 1 day it's event you may like, another is image text, and now it's back to normal 😑 Will reply when i see it again P/s: i was using 4.10 fix for performance in #20, and disable the official version at the time, so i have no idea if it worked or not

zbluebugz commented 1 year ago

I don't see "Event You May Like" very often either ...

The "Event You May Like" detection code is the same in both v4.10 and v4.11.