How to add topic ID to body tag?


I’ve been trying to add the ID of the current topic to the <body> tag but can’t figure it out. Can someone help me out?

Use case: I need to disable AdSense on specific topics that violate AdSense terms.


Can you expand on why you need this on <body> when you already have it on #topic[data-topic-id] ?


Of course; I need to target an element in the page header; the data-topic-id isn’t defined until the topic area.

I have two use cases for this:

  1. On Blender Artists, I need to be able to remove AdSense blocks (both in the page stream but also on the page header) from pages that contain ‘mature’ content.
  2. On Sketchfab, I need to remove the ‘start here’ button from this topic’s header (as it leads to the topic itself).