cloudflare/pint

Public

mirrored from https://github.com/cloudflare/pintAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.28.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docs/_includes/js/custom.js

12lines · modecode

1window.matchMedia('(prefers-color-scheme: dark)')
2 .addEventListener('change', event => {
3 if (event.matches) {
4 jtd.setTheme('dark');
5 } else {
6 jtd.setTheme('light');
7 }
8});
9
10if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
11 jtd.setTheme('dark');
12}