agreed that they should open the source. I imagine it's a pretty simple app. a mapping of css selectors with a single line that runs on page load, something like this:
document.querySelectorAll(css_selector).remove()
the hard part would be maintaining the css selectors. This is probably and arms race situation, where websites will obfuscate their elements in such a way where identifying the elements you want is nigh impossible, but that would probably take more engineering than it's worth. What's really interesting is that facebook does not scrub their `data-testid` attributes, so you can basically key on that since they probably test that part of the application extensively, and probably run smoke tests/chaos engineering on their live app so removing them might be impossible in their current implementation.
right now on facebook the appropriate js code would be:
The extension code is minified but AFAICT it's just injecting some CSS sheets, primarily element hiding rules with display:none but also some spacing fixes. E.g. the Facebook one is
It's not clear why the developer chose to inject the stylesheets dynamically and magnify the footprint 10x by including a polyfill library, rather than using the manifest to specify them declaratively, but whatever.
To satisfy your curiosity: The reason I don't inject the stylesheets declaratively is because you can't disable them and I wanted to give people a way to toggle the hiding functionality.
right now on facebook the appropriate js code would be: