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
113 stars 13 forks source link

"Sponsored" text appeared between posts #59

Closed Rusenche closed 4 months ago

Rusenche commented 4 months ago

@zbluebugz,

Спонсорирано text (Sponsored) appeared between posts

For me, I have made and load a home page from here: https://www.facebook.com/?sk=h_chr

As of today I see this text Спонсорирано text (Sponsored) between the posts. I'm on the stable version 4.29, I typed the word Спонсорирано in my language in the text field, but it doesn't hide.

I tested with uBlock Origin off and then with uBlock Origin on (I wanted to check if some filter was causing it somehow) but this annoying text keeps appearing between posts.

I am providing a picture where I have indicated the problematic text.

Sponso

My goal is to hide this Спонсорирано text (Sponsored) text/title I don't want.

I would like to test by changing the v.4.29 script language to English, but there is no such setting yet.

zbluebugz commented 4 months ago

Are you using another add-on / extension / userscript? I think another addon/extension/userscript puts in that triangle symbol.

Let me know which one it is as I'm curious on how they implement this messaging/notification thing.

Rusenche commented 4 months ago

Supplement: After testing:

But with the absolutely last stable version 4.29 appears.

@zbluebugz there's some bug?!

zbluebugz commented 4 months ago

@Rusenche - You have the "Tracking & Ad Removal on FaceBk" extension enabled.

It is inserting the ▶ Sponsored text.

It has the option to Hide Sponsored articles - you can toggle this.

image

Rusenche commented 4 months ago

@zbluebugz,

Hmm

I ran tests and this turned out to be true, but not quite, it seems:

  1. as you have shown it in the picture with the Hide Sponsored articles setting selected - right then it shows the spam text, which is insane because in order to not show the spam text between posts, the setting you show in the picture has to be unchecked.
  2. with setting selected as in your picture - it's not a problem with beta-4-28-9.user.js and it's not a problem with beta-4-29-01.user.js.

Somehow the stable version 4.29 conflicts with Tracking & Ad Removal on FaceBk and with the Hide Sponsored articles setting selected.

But why is this a problem (as the Hide Sponsored articles setting is selected) with the stable version 4.29?!

In this case I went back to beta-4-29-01.user.js because it doesn't have this problem.

Rusenche commented 4 months ago

Somehow the stable version 4.29 conflicts with the Tracking & Ad Removal on FaceBk extension regarding the appearance of the unwanted caption between posts.

I found this not to be a problem with previous beta versions of the script at the default Tracking & Ad Removal on FaceBk extension settings.

But in order for the latest stable version 4.29 to work correctly with the default settings of the Tracking & Ad Removal on FaceBk extension, it is necessary to additionally select the setting in its menu Remove and not as Collapse is selected by default. All other settings of this extension remain the default.

Only this way the stable version 4.29 works correctly with the extension Tracking & Ad Removal on FaceBk and the unwanted caption between posts does not appear.

303926622-887bcf1b-eaa7-4a3e-8dcb-e7c1db415e0f

zbluebugz commented 4 months ago

The main difference between v4.29-beta-01 and v4.29 is the filter rule used to collection the News Feed's posts.

FYI: FB doesn't like code touching each post's main container much - so we "dive" into the post structure and use a certain nested element as the target point.

v4.29-beta-01 targets the element found at the 4th level of nesting within the post's structure.

v4.29 targets a element having certain attributes - usually found around the 8th level of nesting within the post's structure (before it is processed by any non-FB code).

Tracking & Ad Removal on FaceBk targetting is similar to v4.29.

uBlock Origin filters' targetting is similar to v4.29.

Here's screen-snippet of a post' HTML code (after Tracking & Ad Removal on FaceBk has processed it): Screenshot_4

As you can see from the screen-shot, Tracking & Ad Removal on FaceBk has injected some HTML code above it's targetted element, forcing the original target element's level to go down one more.

The reason you don't see Tracking & Ad Removal on FaceBk messages with v4.29-beta-01 is that the beta's hiding point is much higher up the "tree" (No. 1 in screen-shot) than Tracking & Ad Removal on FaceBk's hiding point (No. 5 in screen-shot).

Why change the target/hiding point for v4.29? - There were some oddities happening with v4.29-beta-01's targetted element. Matching uBO filter's targetted element made sense for v4.29 while I try and sort out the issues with v4.28.


Another option to hide Tracking & Ad Removal on FaceBk's messages while using v4.29, change Tracking & Ad Removal on FaceBk's settings as follows:

Rusenche commented 4 months ago

Thanks for the comprehensive answer and I did what you advised and so far everything works flawlessly.

But now I'm noticing something else that I didn't know about before.

What I mean is this - I log into someone's profile and the menu icon for your remarkable script is gone. Therefore, I can't block either "reels" or type keywords - if I want to block given names and such. Is this normal when logging into someone's profile - the script menu doesn't appear?!

zbluebugz commented 4 months ago

Usually it works when I switch accounts. Occasionally, I have to reload the page for it to "wake up" and do some cleaning up.

Does the userscript manager shows that script has been enabled when you're on FB?

Screen-shot no. 1 - VM's icon in the tool-bar - it has "1" on the icon indicating that a usercript has been matched with this site. image

Screen-shot no. 2 - Expanded VM's popup listing the userscript that is matched and active for the current site. image

If it is listed as active, but not cleaning, then modify the script's code (v4.29).

Uncomment Line No. 3767 (remove "//" from the beginning of the line): From: image

To: image

Then reload FB and check the browser's devtools (Press "F12") console's info tab - look for the line starting with "-- fbcmf :: setFeedSettings() ::"

Chrome's DevTools: image

Firefox's DevTools: image

If isAF: true; is there, then it is in cleaning mode. If isAF: false; is there, then it is NOT in cleaning mode. (the other is__ variables indicate which feed to clean)

If userscript manager says the fb-cmf's script is active, but fb-cmf isn't doing any cleaning up, then post the URL of the page in question.

Rusenche commented 4 months ago

I meant that I was looking for the script icon when visiting a profile.

Ahjj

And according to what you wrote, it turned out that when visiting a profile, I need to activate the script setting (menu) in the Violentmokey menu.

Shh 2

If I understand correctly, why does the script menu not appear as it is on the facebook home page - so that this icon is also there when visiting some user profile?!

Rusenche commented 4 months ago

https://www.facebook.com/liliya.ganeva.5

Jshh

If isAF: true; is there, then it is in cleaning mode. If isAF: false; is there, then it is NOT in cleaning mode. (the other is__ variables indicate which feed to clean)

If userscript manager says the fb-cmf's script is active, but fb-cmf isn't doing any cleaning up, then post the URL of the page > in question.

But from this writing I have no clue how it should be...... So I have provided you with what you asked for and show with a picture.

Help. My thought is that when I visit a user profile I want this to appear in the bottom left again:

Ahjj

zbluebugz commented 4 months ago

A user's profile page is not flagged to have some cleaning up done. Hence the disappearance of fb-cmf's button It'll reappear on other pages such as News Feed, Groups Feed, etc.

zbluebugz commented 4 months ago

But from this writing I have no clue how it should be...... So I have provided you with what you asked for and show with a picture.

From the screen-shot - the script is saying that it is not any cleaning up - that is because you're visiting a user's profile page and the script is coded not to process user profiles.

Rusenche commented 4 months ago

What should I do to make the icon in question appear when visiting profiles?

zbluebugz commented 4 months ago

It won't - it doesn't have the filtering code setup for user profiles.

Rusenche commented 4 months ago

Are you saying this is on purpose - to not have the script menu/button appear when we visit a user profile?

zbluebugz commented 4 months ago

Yes.

Rusenche commented 4 months ago

Thanks for the clarification. I had no idea this was done on purpose. Because I thought about how to call the script menu in this case to hide certain parts of the user profile page.

/I'm tempted to ask why this restriction is imposed instead of actually having this menu present... :P )

So there is only one option left to pop up the script menu when we visit a user profile? Shh 2

zbluebugz commented 4 months ago

Yes, it is deliberate. I don't see any "junk/spam" when I view my contacts' profiles. :-)

That "settings" option is there as a backup / alternative method in calling up fb-cmf's dialog box. It won't trigger the code to do any cleaning up when it doesn't know how to handle the page you're viewing.

FYI - the fb-cmf dialog has an option to hide the button from all pages if the user doesn't want the button to be visible. Hence the "Settings" entry in the screen-shot.

Rusenche commented 4 months ago

But this way with a hidden button when we visit a user profile is not convenient for me and I wish the button/menu had it. ;))) I hope you have mercy. ;)

By the way - I visited this profile: https://www.facebook.com/deni.doncheva.9 I scrolled down a bit to "November 27, 2023". And there is a post from Woman LifeBook. I typed Woman LifeBook into the script and nothing happened - this post didn't hide. Why?!

zbluebugz commented 4 months ago

I scrolled down a bit to "November 27, 2023". And there is a post from Woman LifeBook. I typed Woman LifeBook into the script and nothing happened - this post didn't hide. Why?!

The post isn't hidden because fb-cmf is NOT coded to do any cleaning up on user's profiles.

I might look into the option of doing cleaning up of user profiles at later date - requires a new big section in fb-cmf's dialog box (i.e. seperate block of options + text-filters just for user profiles)

Rusenche commented 4 months ago

I didn't know, I didn't know that FB - Clean my feeds doesn't work when visiting user profiles. In that case - when we visit user profiles that contain posts we want to block - it doesn't work in the current version of the script? And again - if we visit user profiles that have "reels" - we can't block them either?!

So when visiting user profiles, nothing can be hidden. It's terrible....as it stands now. :| :|

Rusenche commented 4 months ago

@zbluebugz, this is totally off topic but could you offer in the menu an option to hide posts that contain gifs?!

For example, here is such a post: https://www.facebook.com/groups/149661048731646/?multi_permalinks=2097428583954873&hoisted_section_header_type=recently_seen

I want to clarify that my desire is to be able to hide them when I scroll through the facebook home page.

I ask because currently the menu can only pause, but does not offer an option to hide this type of post.

zbluebugz commented 4 months ago

could you offer in the menu an option to hide posts that contain gifs?!

Current menu only pauses gifs in the comments - not in the post's content.

If you want to hide posts having gifs, in the post's content, then create a new issue for this.

Blocking a post having a gif in the comments is not an option.

zbluebugz commented 4 months ago

Oh, can you give me a different link where a post has a gif image to be blocked? The one you provided is not allowing me to join.

Rusenche commented 4 months ago

@zbluebugz commented 19 hours ago Oh, can you give me a different link where a post has a gif image to be blocked? The one you provided is not allowing me to join.

This is what appears for me: https://www.facebook.com/groups/149661048731646/?multi_permalinks=2098453117185753

zbluebugz commented 4 months ago

This is what appears for me

You have to sign up to that group. They're not allowing me in for some reason.

Rusenche commented 4 months ago

@zbluebugz,

Maybe you are with an IP that is suspicious to them.

It struck me that it shows and says it's a GIF. But I go to the three dots -> Copy link. After which it turns out that the address is: https://www.facebook.com/100013764198159/videos/942502324126489/

gif

Kopi

I mean, it turns out that it supposedly says it's a GIF, but it actually turns out to be some kind of video clip?!

zbluebugz commented 4 months ago

Animated GIFs/MP4s in post's content will be available in next release.