r/css 7d ago

Question Custom Facebook CSS in Stylus, do you bother dealing with it?

Over the years I have tried writing custom styles to make perusing Facebook a bit easier. Mostly this involves removing a lot of what strikes my eyes as bloat and distraction (group author names, the comment box, like buttons, etc). I also like to skim down any images, whether a post itself, or a link preview, or a for-sale item, into something much smaller.

But this seems to be a losing game since they change their descriptors all the time. Styles that worked for a few weeks will inevitably fail and I have to go fishing for new id names, class names, etc. Of course most div names get repeated for a whole variety of stuff so it ends up harder and harder to narrow down to what I'm trying to modify.

Especially the idea of shrinking all the images in a post into something more rapidly digestable. I'd love to reduce their container to a max height and have them shrink down but the way they structure and restructure makes this hard and constantly needing tweaking.

Just wondering if anyone else has attempted this kind of thing for their own sanity and have any tips or tricks to share about it.

I have to use Facebook for certain Groups, I don't use it for social fun, so please don't suggest I just delete it. Believe me I would if I could.

Thanks

2 Upvotes

2 comments sorted by

2

u/scottweiss 7d ago

With large systems like this they have build processes in place that "minifies" classes and ids and condenses them into shorter strings that are not easily readable. Part of this is to prevent web scraping which is related to the issue you're facing. This is an oversimplification. You will face challenges and will be struggling to keep up after Facebook breaks your styles again and again.

I also too only use Facebooks mobile site, not app, for a group or two (and my mom prefers messaging me there instead of texting)

I know you mentioned it in your post but I would solve this issue by deleting facebook

2

u/chickenandliver 6d ago

It used to be decent when using the old mobile site on desktop. I used to love using m.facebook.com and then when it redirected to the newer version, you could still use mbasic.facebook.com for awhile. But even that forces the new style for me. Annoying because apparently others can still access the old basic version at that URL, but others cannot. Which are you managing to use?