1c85730e15
Thanks to Anthhony, I now have a better option 🙇 Using `<script>toggleTheme('dark')</script>` directly from the markdown given it's already availale from the head declaration. As a bonus, we don't mess with user's preferences for other pages.master
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -157,12 +157,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -159,12 +159,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -149,12 +149,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -158,12 +158,6 @@ Le bonheur d’avoir dans son assiette le poisson que l’on a pêché, dans sa | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -149,12 +149,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -160,12 +160,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -151,12 +151,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -145,12 +145,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -140,12 +140,6 @@ Nuit agitée.</p> | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -149,12 +149,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -152,12 +152,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -154,12 +154,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -159,12 +159,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -140,12 +140,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -151,12 +151,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -150,12 +150,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -153,12 +153,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -150,12 +150,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -138,12 +138,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -153,12 +153,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -151,12 +151,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -136,12 +136,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -150,12 +150,6 @@ Si nous n’explorons pas cette histoire, qui vit activement en nous comme les p | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -140,12 +140,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -145,12 +145,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -136,12 +136,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -150,12 +150,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -145,12 +145,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -151,12 +151,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ The best way to help your IE11 users is <mark>to provide a great experience | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -159,12 +159,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -140,12 +140,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -139,12 +139,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -159,12 +159,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -183,12 +183,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -147,12 +147,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -142,12 +142,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -141,12 +141,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -151,12 +151,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -140,12 +140,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -143,12 +143,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -146,12 +146,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -148,12 +148,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -144,12 +144,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||
@@ -145,12 +145,6 @@ | |||
const selectedTheme = localStorage.getItem('theme') | |||
if (selectedTheme && selectedTheme !== 'undefined') { | |||
form.querySelector(`[value="${selectedTheme}"]`).checked = true | |||
// Also manually dispatch the event in case I want | |||
// to force a default given theme from the article with: | |||
// localStorage.setItem('theme', 'dark') | |||
form.value = selectedTheme | |||
const changeEvent = new Event('change') | |||
form.dispatchEvent(changeEvent) | |||
} | |||
} | |||