Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GoogleChromeLabs/dark-mode-toggle
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.16.0
Choose a base ref
...
head repository: GoogleChromeLabs/dark-mode-toggle
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 6 commits
  • 6 files changed
  • 2 contributors

Commits on Oct 5, 2024

  1. Update dark-mode-toggle.d.ts to reflect new possible value for "apper…

    …ance"
    Haocen authored Oct 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c63f722 View commit details

Commits on Oct 7, 2024

  1. Merge pull request #91 from Haocen/patch-1

    Update dark-mode-toggle.d.ts to reflect new possible value for "apperance"
    tomayac authored Oct 7, 2024
    Copy the full SHA
    f987ac4 View commit details
  2. Draft new version

    tomayac committed Oct 7, 2024
    Copy the full SHA
    2878a35 View commit details

Commits on Feb 13, 2025

  1. Add meta tag to loader script

    tomayac committed Feb 13, 2025
    Copy the full SHA
    5d70105 View commit details
  2. Add meta tag to demo

    tomayac committed Feb 13, 2025
    Copy the full SHA
    9715f86 View commit details
  3. Prettier

    tomayac committed Feb 13, 2025
    Copy the full SHA
    b6723cd View commit details
Showing with 721 additions and 437 deletions.
  1. +1 −0 README.md
  2. +1 −4 demo/without-flashing.html
  3. +681 −418 package-lock.json
  4. +7 −7 package.json
  5. +29 −7 src/dark-mode-toggle-stylesheets-loader.js
  6. +2 −1 src/dark-mode-toggle.d.ts
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -132,6 +132,7 @@ script as follows:
href="dark.css"
media="(prefers-color-scheme: dark)"
/>
<meta name="color-scheme" content="dark light" />
</noscript>
<script src="https://googlechromelabs.github.io/dark-mode-toggle/src/dark-mode-toggle-stylesheets-loader.js"></script>
<script
5 changes: 1 addition & 4 deletions demo/without-flashing.html
Original file line number Diff line number Diff line change
@@ -12,21 +12,18 @@
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>
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.
Loading