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
118 stars 12 forks source link

Handle new news feed suggested group structure #46

Closed opello closed 1 year ago

opello commented 1 year ago

Looks like there's been another structural change. I copied the style of the last update to the suggested posts (from May) and updated the queries. I don't know if both of the aria-posinset and aria-describedby versions are required, either one worked in my testing.

>> var x = document.querySelectorAll('div[aria-posinset] > div > div > div > div > div > div:nth-of-type(2) > div > div > div:nth-of-type(2) > div > div:nth-of-type(2) > div > div:nth-of-type(2) > span > span > span:nth-of-type(2)');
<- undefined
>> x[2].innerHTML;
<- "Suggested for you" 
zbluebugz commented 1 year ago

Waiting for FB to show me some Suggested Posts.

Both aria-posinset and aria-describedby are required - some users do not have the aria-posinset, hence the fall-back to aria-describedby.

zbluebugz commented 1 year ago

FB hasn't shown me "Suggested for you" posts with the structure that you're seeing. Current rules still working for me.

However, another user has report similar issue.

Added your changes to a beta copy of the userscript I've been tweaking.

Can you test v4.25-beta-5

opello commented 1 year ago

v4.25-beta-5 hides the ones that aren't hidden for me in v4.24.

These are all news feed suggestions to join a group, if that helps?

zbluebugz commented 1 year ago

Thanks for the feedback.

Currently, FB is not serving the new HTML structure for suggesting a group to me - hence the request for you to test it. I'll eventually see it - just not too sure when FB will rollout the updates to my region.

Can you confirm the following are hidden when using 4.25-beta-2: 1) Suggestions to "join a page" 2) Suggestions to "join a group" 3) Recommendations to follow/join

opello commented 1 year ago

The "Suggested groups" carousel is hidden. I see a "Suggested for you" page is also being hidden. I see a "Suggested for you" group is also being hidden (looks to still be the new structure). I see an individual being suggested to follow now too.

I think that covers what you've identified? I'm not much of an expert in the different types of these things I'm afraid. I identified if it was a suggestion for a page by hovering over the name and seeing "page/website" and for a group there's a "Join" button and for an individual it's a personal page.

zbluebugz commented 1 year ago

Thanks for the feedback.

Not too sure about following/suggesting an individual - hard to tell them apart from other recommended/suggested posts.

The function used to detect suggested/recommended posts, looks for certain HTML structures and then test the first letter of the text it finds.

Will make v4.25-beta-5 live, as v4.25, a in a day or two.

zbluebugz commented 1 year ago

Version 4.25 has been released/published.