gh-142927: Detect system theme in flame graph like in heatmap by hugovk · Pull Request #144885 · python/cpython
The heatmap initially detects the user's preferred theme (via prefers-color-scheme) but the flame graph does not.
This PR allows the flame graph to do the same, and refactors some shared JavaScript code into a new base.js file to avoid duplication.
- Issue: Improve Tachyon UX #142927