I’m working on something similar that applies to any topic with a specific tag. I haven’t found a way to do it with the api at this point, but there is a CSS class for each tag that you can use to make sure you are in a topic with that particular tag:
$('.tag-tagname').length
In my scenario, tagname will be something an admin can set in a setting.