mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 05:21:18 +00:00

* Move History storage to sessionStorage and history path to window * Fix type warnings * Revert currentPathForHistory to move it to its own PR * fix test
18 lines
493 B
JavaScript
18 lines
493 B
JavaScript
var server = makeServer()
|
|
var autoRespond = sessionStorage.getItem('hx-scratch-autorespond') == 'true'
|
|
server.autoRespond = autoRespond
|
|
ready(function() {
|
|
if (autoRespond) {
|
|
byId('autorespond').setAttribute('checked', 'true')
|
|
}
|
|
})
|
|
function toggleAutoRespond() {
|
|
if (server.autoRespond) {
|
|
sessionStorage.removeItem('hx-scratch-autorespond')
|
|
server.autoRespond = false
|
|
} else {
|
|
sessionStorage.setItem('hx-scratch-autorespond', 'true')
|
|
server.autoRespond = true
|
|
}
|
|
}
|