I'm trying to block/remove a specific stylesheet from a page. The context here is that this stylesheet is the stylesheet specific to a specific subreddit. The HTML looks like this (from the ublock origin subreddit):

<link rel="stylesheet" ref="applied_subreddit_stylesheet" title="applied_subreddit_stylesheet" type="text/css" jr9j7vt="" href="https://b.thumbs.redditmedia.com/x1EvRnEHlyWqignh2O2sB2jqVs7clKIcjooIGRfYMVY.css" >

This sounded like an application for procedural cosmetic filters, so I added this reddit-specific xpath filter:

reddit.com##:xpath(//link[@title = 'applied_subreddit_stylesheet'])

That doesn't work. The page still looks like this image, which indicates that the custom stylesheet is still loaded:

ublock origin subreddit with custom stylesheet

It should look like this image, which is after I delete the custom stylesheet through inspect element:

ublock origin subreddit without custom stylesheet

I'm using uBlock Origin v1.22.2 and Firefox ESR v68.2.0esr, both from the Debian 10 ("buster") repositories. Downloading Firefox and/or uBlock Origin from outside the repositories is not an option on this system.


Block stylesheets coming from the b.thumbs.redditmedia.com URL directly:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.