Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This doesn't work for many sites that use randomly generated class names and IDs. For example, it's really difficult to trim all the cruft and junk from Twitter's web interface without an userscript. With the script though it's trivial and you can also filter the feed to remove ads, suggestions, posts liked by some random people, etc.


I only modify a small number of sites that I regularly visit and so far I’ve only once come across a site with random class names and IDs (I’m guessing that’s done as a way to defeat what we’re talking about). If I remember correctly, I got around the random name problem by removing the parent element which had a defined name.

I don’t visit Twitter and certainly never tried to do anything as sophisticated as what you’re describing (though it sounds like other users on this page would benefit from your userscript). I just make the sites that I regularly visit that bit easier on the eye without spending too much effort on modifying styles (I also haven’t done web development in the last 10-15 years so delving into scripts and the DOM wouldn’t be my forté).


The popular modern css and react style frameworks use dynamically generated ids and classes so it’s not necessarily to prevent userscripts but it does make it harder to use them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: