Merge branch 'push-input-through-postmessage' of github.com:kenduguay1/CyberChef into push-input-through-postmessage

This commit is contained in:
Ken Duguay 2025-05-09 14:22:11 +00:00
commit a150137c4b
42 changed files with 8758 additions and 3372 deletions

8
src/web/waiters/OptionsWaiter.mjs Executable file → Normal file
View file

@ -163,6 +163,14 @@ class OptionsWaiter {
themeSelect.selectedIndex = themeSelect.querySelector(`option[value="${theme}"`).index;
}
/**
* Applies the user's preferred color scheme using the `prefers-color-scheme` media query.
*/
applyPreferredColorScheme() {
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)").matches;
const theme = prefersDarkScheme ? "dark" : "classic";
this.changeTheme(theme);
}
/**
* Changes the console logging level.