I am trying to make a small chrome extension for a forum, but I want it to work in a specific area of the forum.
The problem is that I can’t just "match": ["subforum"], because the threads in this forum do not distinguish which subforum they are at the URL.
The sub-forum has its own CSS stylesheet, so I think that if I can quickly check if the current subforum.css stylesheet matches, it will work fine.
Basically, I just need to check the name of the stylesheet, and if this is not possible, then how can I accurately check whether the current stylesheet contains some word or element or something like that.
source
share