about summary refs log tree commit diff
path: root/bskyembed/snippet
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-03-05 17:24:59 +0000
committerGitHub <noreply@github.com>2025-03-05 09:24:59 -0800
commit2d854091b9684ab253a2c117509bf95609a975a1 (patch)
tree965f049c7d8e13e61bd1ce05737113340fb3d991 /bskyembed/snippet
parent01a51c327505bc84f5755be82f15a855234a2750 (diff)
downloadvoidsky-2d854091b9684ab253a2c117509bf95609a975a1.tar.zst
enhance(embed): add ability to pin color mode (#7186)
* enhance(embed): add ability to pin color mode

* fix: Move color mode dropdown to the root section

* auto -> system

* style tweaks

* default to light theme

* try and fix eslint

* fix dropdown styles on other browsers

* rm unnecessary eslintrc change

* more explicit color mode select

* make light explicit

---------

Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Diffstat (limited to 'bskyembed/snippet')
-rw-r--r--bskyembed/snippet/embed.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/bskyembed/snippet/embed.ts b/bskyembed/snippet/embed.ts
index 3c1b14b95..7de7af1fe 100644
--- a/bskyembed/snippet/embed.ts
+++ b/bskyembed/snippet/embed.ts
@@ -68,6 +68,7 @@ function scan(node = document) {
     if (ref_url.startsWith('http')) {
       searchParams.set('ref_url', encodeURIComponent(ref_url))
     }
+    searchParams.set('colorMode', embed.dataset.blueskyColorMode || 'system')
 
     const iframe = document.createElement('iframe')
     iframe.setAttribute('data-bluesky-id', id)