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

"Syntax error" message #48

Closed washinoboku closed 5 months ago

washinoboku commented 7 months ago

Hi there After installing it, it worked perfect on the first use. After that it started having problems showing or hiding parts of the page. Now it doesn't work. Any idea why this happened? I am using version 4.25.

Sin título-1

zbluebugz commented 7 months ago

I can create similar issue with VM by introducing a bug/error in the code. VM will not run the userscript after fixing the bug/error or pasting in a fresh copy of the userscript code.

After restarting the browser, VM will then run the userscript.

This bug appears to affect other userscripts as well.

Logged issue with Violentmonkey: https://github.com/violentmonkey/violentmonkey/issues/1960

In the meantime, use another userscript manager until Violentmonkey resolves this weird issue.

zbluebugz commented 7 months ago

@washinoboku Can you try this work-around mentioned in VM's comment: https://github.com/violentmonkey/violentmonkey/issues/1960#issuecomment-1817972976

Let me know how you get on.

washinoboku commented 7 months ago

@washinoboku Can you try this work-around mentioned in VM's comment: violentmonkey/violentmonkey#1960 (comment)

Let me know how you get on.

It worked but after restarting Firefox. Disabling and enabling VM does nothing.

Thank you for helping!

zbluebugz commented 7 months ago

Just to confirm your actions, did you disable Alternative page mode in Violentmonkey settings (under Settings > Advanced)?

image

washinoboku commented 7 months ago

Just to confirm your actions, did you disable Alternative page mode in Violentmonkey settings (under Settings > Advanced)?

image

Yes. Sorry for not mentioning it.

zbluebugz commented 7 months ago

If the userscript is not working, is there an error message in the Developer Tools > Console? Ignore the following errors:

Can you install a fresh copy of the userscript?

washinoboku commented 7 months ago

If the userscript is not working, is there an error message in the Developer Tools > Console? Ignore the following errors:

* "Content-security-policy"

* Anything that mentions "React error"

Can you install a fresh copy of the userscript?

After disabling "alternative page" and restarting the browser it started working again. I still went to review what you told me and found this: console-export-2023-11-21_15-1-28.txt Also install a fresh copy of the script. I hope that's what you needed to know. Anything else that might help, let me know.

zbluebugz commented 7 months ago

Let us pause here for a moment to clarify something:

1) VM's "alternative page" option disabled 2) A fresh copy of fb-cmf's userscript has been installed.

Question: is the fb-cmf's userscript running successfully? (i.e. finding and hiding certain posts)

washinoboku commented 7 months ago

Let us pause here for a moment to clarify something:

1. VM's "alternative page" option disabled

2. A fresh copy of fb-cmf's userscript has been installed.

Question: is the fb-cmf's userscript running successfully? (i.e. finding and hiding certain posts)

Points 1 and 2 are correct. I am not a very active Facebook user and I only interact with the main feed (news) but give me a few days to verify that it works. I'm going to hide everything to be safe.

zbluebugz commented 7 months ago

Thanks for the feedback.

To test if it is working:

Open fb-cmf's settings dialog box, scroll down to "Verbosity" section and enable "1 post hidden. Rule: ___" option. image

Click "Save" and "Close" buttons (no need to refresh the page - fb-cmf will rescan the page again) image

In the News feed you'll see something like this: image

If you click on the grey button, it will show the "hidden" post with a thick red dotted border. image

Toggle that button again to "hide" that post.

NB: If you use an adblocker, such as uBlock Origin, the post may not be shown. Instead, you'll see an empty box with a thick red dotted border. This is because the adblocker has detected the same sponsored post, but has flagged a different part of the post to be hidden. fb-cmf will not try to undo that adblocker's actions as it can cause conflicts/issues. image

After the testing, if you don't want those notification tabs in the feed, set the Verbosity's settings to "". Click "Save" and "Close" buttons (no need to refresh the page - fb-cmf will rescan the page again)