Skip to content

Commit

Permalink
Add meta tag to demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tomayac committed Feb 13, 2025
1 parent 5d70105 commit 9715f86
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions demo/without-flashing.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<noscript id="dark-mode-toggle-stylesheets">
Expand All @@ -12,26 +12,25 @@
href="dark.css"
media="(prefers-color-scheme: dark)"
/>
<meta name="color-scheme" content="dark light" />
</noscript>
<script src="../src/dark-mode-toggle-stylesheets-loader.js"></script>
</head>
<body>
<h1>Demo without flashing</h1>

<div>Refresh to test: <a href="without-flashing.html">Refresh</a></div>

<div>Go to the version <a href="with-flashing.html">with flashing</a></div>

<div>Refresh to test:
<a href="without-flashing.html">Refresh</a></div>
<div>Go to the version
<a href="with-flashing.html">with flashing</a></div>
<div>
Switch theme:
<dark-mode-toggle permanent></dark-mode-toggle>
</div>

<script type="module" src="../src/dark-mode-toggle.mjs"></script>
<script>
// Load uncached script to simulate a slow loading.
const rand = Math.random();
document.write('<script src="1-mb.js?r=' + rand + '"><\/script>');
</script>
</body>
</html>
</html>

0 comments on commit 9715f86

Please sign in to comment.