mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
set initial selection instantly
This commit is contained in:
@@ -16,3 +16,10 @@
|
||||
System
|
||||
</wa-option>
|
||||
</wa-select>
|
||||
|
||||
<script>
|
||||
// Immediately set the correct value from storage
|
||||
document.querySelectorAll('wa-select.color-scheme-selector').forEach(el => {
|
||||
el.setAttribute('value', localStorage.getItem('color-scheme') || 'auto');
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -16,3 +16,10 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</wa-select>
|
||||
|
||||
<script>
|
||||
// Immediately set the correct value from storage
|
||||
document.querySelectorAll('wa-select.theme-selector').forEach(el => {
|
||||
el.setAttribute('value', localStorage.getItem('theme') || 'default');
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user