mirror of
https://github.com/ssyyhhrr/stewardle.git
synced 2025-11-15 21:33:49 -05:00
Version Check on Load
This commit is contained in:
@@ -503,6 +503,17 @@ function fillStats(stats, scores) {
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
fetch(`${window.location.href}version`).then(res => {
|
||||
res.text().then(result => {
|
||||
if (result !== localStorage.version) {
|
||||
localStorage.removeItem("guesses")
|
||||
localStorage.removeItem("version")
|
||||
localStorage.removeItem("answers")
|
||||
localStorage.version = result
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
})
|
||||
if (localStorage.getItem("highContrast") === null) {
|
||||
document.getElementById("highContrast").disabled = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user