How to create a custom rule for a specific URL of a domain

eXiLED

New Member
Hi,

I'm trying to create a custom cosmetic user rule to hide a <div> in a specific URL of a domain. For example, I want the rule to only apply to:

example.com/about
but not the entire domain: example.com

Its tricky because the class name of the <div> randomizes every time you refresh the page, and that particular <div> is only present in that one /about page in the domain. I've tried stuff like:

##.randomizedClassName, but as I mentioned its useless because it changes to a new random class name when the page refreshes.

I tried div:nth-of-type(n), which works and consistently hides the <div> regardless of its randomized class name but it applies to the entire domain which hides important elements outside of example.com/about.

Is there anyway to restrict the rule to just example.com/about and not apply to the entire domain example.com?

Any help would be appreciated.
 

eXiLED

New Member
[$path=/about]example.com##.classname
That did the trick, thank you. I did try using [$path=/about] in my attempts but it seems its placement in the rule was wrong, I placed it after the domain, which is why it would seem that it wasn't working before.
 
Top