79540014

Date: 2025-03-27 20:56:13
Score: 0.5
Natty:
Report link

You can simply use document.body.dataset.theme to detect the current Azure DevOps theme (e.g., "light", "dark", "high-contrast") without making any API or network calls.

This value is injected directly into the DOM by Azure DevOps and stays in sync with the user's theme preferences.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: sgryt