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

I have all the reels and short videos hidden. Last few days I am still getting them. #40

Closed rasungod0 closed 1 year ago

rasungod0 commented 1 year ago

They must have changed something in their code.

2023-08-22_16-50

zbluebugz commented 1 year ago

Can you give me some more details, please.

Browser + version? Userscript manager + version? fb-cmf's version? Your country?

rasungod0 commented 1 year ago

Brave Version 1.56.14 Chromium: 115.0.5790.114 (Official Build) (64-bit) Violentmonkey 2.15.0 // @version 4.23 Canada

Now that I think about it, they might have just recently changed a bunch of stuff for Canada because a new law says if a social network serves news to Canadians it needs to be 50% Canadian. So Facebook just banned all Canadian news to maliciously comply.

zbluebugz commented 1 year ago

I've installed Brave + Violentmonkey + fb-cmf userscript. It's hiding the "Reels and shorts videos" component for me.

Can you assist further by providing me the HTML code used for the "Reels and short videos" component, please.

Right mouse click somewhere on the "Reels and short videos", choose "Inspect" from the pop-up menu image

1) Press CTRL + F keys to open the Find/Search box (#1 in screenshot) and type in Reels and short videos - press Enter just once (It'll find 2 occurrences - want the first one (#2 in screenshot shows "1 of 2") 2) Brave will highlight the line (#3 in screenshot) - make sure it is somewhat similar to the screen-shot 3) From the yellow highlighted line, walk up the HTML branches to locate <div class="x1lliihq"> (#4 in screenshot) image

4) Right mouse click on that and choose "Copy > Copy outer HTML". image

5) Then save it in https://gist.github.com/ (use the "Create secret gist" option) and paste the link to that gist here (I'll let you know when to delete it).

rasungod0 commented 1 year ago

https://gist.github.com/rasungod0/4d3159b5f834863a9ad41bdede022c02

zbluebugz commented 1 year ago

Thanks for the HTML code snippet. You can delete that gist file.

I've compared it with mine and structurally, they're somewhat same - with some differences.

Your HTML snippet suggests that fb-cmf script was disabled before you copied the HTML snippet - is this correct?

I see no reason why fb-cmf's function nf_isReelsAndShortVideos(post) couldn't mark it as Reels and short videos. The function's query code is very simple - find a particular A element having a certain href value.

I can see that you're using SFX. I installed it and see that it is removing posts and stopping the auto-loading of new posts - not too sure if this is affecting fb-cmf.

Are you able to test fb-cmf with SFX disabled?

With both SFX and fb-cmf script enabled, could you try running the Javascript snippet below via DevTools' Console panel? - Run it when you see a "Reels and Short Videos" post.

function searchForReelsAndShortVideos() {
  // -- search for the "Reels and Short Videos" post
  // -- (the one that lists more than 1 reel/video and has "see more" link)
  const query = 'a[href="/reel/?s=ifu_see_more"]';
  const rasvAll = document.querySelectorAll(query);
  console.info('searchForReelsAndShortVideos(); rasvAll count:', rasvAll.length);
  if (rasvAll.length > 0) {
    const rasv = rasvAll[0];
    console.info('searchForReelsAndShortVideos(); - found a RaSV!');
    console.info('searchForReelsAndShortVideos(); - RaSV element:', rasv);
    console.info('searchForReelsAndShortVideos(); - Post container(1):', rasv.closest('div.x1lliihq'));
    console.info('searchForReelsAndShortVideos(); - Post container(2):', rasv.closest('[aria-describedby]').parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement);
  }
  else {
    console.info('searchForReelsAndShortVideos(); - could not find a RaSV component ...');
  }
}
searchForReelsAndShortVideos()
zbluebugz commented 1 year ago

Can you try/test version 4.24-beta-3, please.

rasungod0 commented 1 year ago

I'm not one for code. I'm a hardware hacker.

I was able to get it looking my way with uBlock Origin