Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@iiii It's usually a way of not having to worry about class naming when developing and letting the computer do it for you.
If you want to watch for the element you can use the MutationObserver API instead of polling which will probably be much better for performance. -
Yeah man the system is holding us down ✊😭
No ya doofuses it's for minification and a simple obfuscation to protect their proprietary code -
There is nothing that can be saved from MutationObserver, few lines of userscript and the more distinct selectors.
-
iiii92192y@ScriptCoded yeah, I know the ways of scanning the stuff, but it's still an annoying obfuscation at best
-
iiii92192yEven a more sophisticated CSS selector can usually help because the ad elements usually have different structure despite looking the same
-
@iiii The ways of scanning the stuff? You mean MutationObserver? That was for Op, not you
-
The main reason is probably they are using components and css modules providing encapsulation and size reduction.
Not intentional obfuscation.
(that would only be used for anti adblocking and not globally)
However that being said, no shits are given about user scripts and style overrides - if that means giving up a beneficial part of your tech -
Related Rants
Randomly generated CSS class names make customization of sites much more difficult.
Randomized gibberish CSS class names like "r-acJ79b" are used by some sites like the new Reddit and the new Twitter web apps, which makes it impossible to customize the appearance of the site and to hide "trending" spam. The only way hide annoying and spammy page elements is through user scripts which scan the page for it every second and then hide it. But until then, it appears on screen for a short period.
I once thought this is caused by react JS, but the react JS front end of the video platform "Odysee" does not have randomized CSS class names.
rant
bad design
css
web app
html