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

Settings Not Saving #4

Closed qhanlon closed 1 year ago

qhanlon commented 1 year ago

Within FB the core features are working, but if I check any of the fields, such as "Suggested for you," it won't save for when I reload so they'll keep showing up. I could just be missing something, however, since I don't see any buttons within the interface to "Save Changes" for the future.

zbluebugz commented 1 year ago

Sounds like you're in private/incognito mode or have the enabled the browser's option to clear out data when the browser is closed.

"Clean my feeds" uses "Indexed DB" facility to save the options, as Facebook automatically clears out cookies and local storage items that do not belong to Facebook.

You can Export the changes and next time you use FB, Import the changes.

Another option is to stop the Clean-my-feeds script from being updated in the script-manager and hard-code the various options to be enabled/disabled. You will be able to change the components for the News feed, Groups feed, Videos feed and Miscellaneous items. Other options (such as text-filters) are not easily changed in the code (best left alone). To change, in the script's code, change the various options by toggling the components that have the 'defaultEnabled' line (change it to true to enable it) e.g. of a feature/component code - "People you may know":

    // - People you may know:
    NF_PEOPLE_YOU_MAY_KNOW: {
        'en': 'People you may know',
        'pt': ['Pessoas que talvez conheças', 'Pessoas que você talvez conheça'],
        'de': 'Personen, die du kennen könntest',
        'fr': 'Connaissez-vous...',
        'es': 'Personas que quizá conozcas',
        'cs': 'Koho možná znáte',
        'vi': 'Những người bạn có thể biết',
        'it': 'Persone che potresti conoscere',
        'lv': 'Cilvēki, kurus tu varētu pazīt',
        'pl': 'Osoby, które możesz znać',
        'nl': 'Mensen die je misschien kent',
        'he': 'אנשים שאולי אתה מכיר',
        'ar': 'أشخاص قد تعرفهم',
        'id': 'Orang yang Mungkin Anda Kenal',
        'isSuggestion': true,
        'defaultEnabled': false, // toggle this to be enabled by default.
    },

Change the last line 'defaultEnabled': false, to 'defaultEnabled': true, to hide the "People you may know" post.

qhanlon commented 1 year ago

Which setting would it be for clearing out data when Chrome is closed? I'm not sure if that's the case since I can open a tab of FB, enable a setting, then open a new tab without closing the current one and the setting won't be changed there. I'm also not using incognito for it so that's not what's going on. I'm actually not sure if my version I'm using is up to date or if there's something else messing with it since I have the tooltip for Import/Export but the options themselves have no such buttons for me.

image

As for hard coding, I'll look into it. I'm assuming there are no other injected buttons besides this one, correct? Just to make sure I'm not missing something obvious for where settings would be.

image

zbluebugz commented 1 year ago

Clean my feeds (CMF) version Latest public release is 3.26 You can find the version number near the top of the script's code (line #6 I think) It'll say something like this: // @version 3.26 A newer version in currently being worked on. No released date has yet been set.

Chrome and cache/data flushing setting: I currently use Chrome version 101 for testing. CMF has been tested with versions 90-93 and 101 without issues.

Chrome has a setting for wiping out site cookies and data. It's called/labelled as "Clear cookies and site data when you close all windows". If this is enabled, then (CMF) settings will be wiped out when you close down Chrome.

Switching tabs: If you set CMF settings in one tab with FB, open up another tab with FB, close the other tab, CMF settings are still there - just like FB's cookies and site data. If Chrome's clear data setting is enabled, then both FB and CMF data will be cleared out when you quit Chrome.

CMF's Buttons: There's 6 buttons. 1) When you visit FB, there's a CMF button/icon (bucket with mop) in either top-right or bottom-left corner. 2) With CMF's dialog box open, there's an "X" button in top right corner (see screen shot below) 3) With CMF's dialog box open, the "Save", "Close", "Export" and "Import" buttons are located at the bottom of the dialog box (see screen shot below)

cmf-v326

If you want me to enable certain options by default for you, let me know and I'll create a copy for you. Also, list which options you want enabled / disabled. Only issue with this, you won't get any updates when new versions are released.

BTW, which script manager are you using? Tampermonkey? Greasemonkey? Violentmonkey? Firemonkey? other?

qhanlon commented 1 year ago

EDIT: I found the issue. uBlock was the reason that I couldn't see the buttons, so I'll have to investigate further as to why that was going on. Changing settings with uBlock disabled so I could press the save button worked. I had no idea that the Save, Close, Export, and Import buttons existed. I double checked that my custom element nuking through uBlock wasn't affecting it, so I guess there's just something about the bottom four buttons that uBlock dislikes and refuses to allow.

Thanks for helping me realize that I was the one messing it up. Sorry about that.

I'm currently running "Version 105.0.5195.102 (Official Build) (64-bit)" for Chrome (i.e. the latest version I believe), running this script through Tampermonkey v4.16.1, and the version of the script is 3.26 so it sounds like it should be up to date.

I am not using the option to clear cookies/site data when windows are closed, and the options within the plugin don't persist even when I leave a tab of FB open while opening a new one. I believe the issue is that I'm not getting the buttons for some reason. I haven't modified the script in any way so I'm unsure what could be causing this. I can open the dialogue box, but all I have is the button to open it and the X button as shown below.

![image](https://user-images.githubusercontent.com/59808985/189461285-fba92f11-c328-45cd-9c39-cafa040fa5c9.png)
zbluebugz commented 1 year ago

Good to hear you have found out what caused the issue - a customised uBO filter. It's not something that I would have thought of.

I use uBO as well and have no problems with it.

FYI, I have created some uBO filters that does most of the things that Clean-my-feeds does. You're welcome to try them out.

If you need help with debugging the custom uBO filter(s) you have, post it here and I can investigate it further.

qhanlon commented 1 year ago

I found that the issue is from a long, long time ago when I'd set a custom rule to hide footer elements in FB while making it into a minimalist site. It seems removing that allows me to access/use the buttons from this script.

Thanks again for the help!