mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
Do not save into localStorage if render is enabled
We do not really want to save anything into user's storage/cookie unless necessary
This commit is contained in:
parent
cf570347e6
commit
2bdb1d7245
@ -47,10 +47,10 @@ page.doRenderSwal = function () {
|
||||
}
|
||||
}).then(function (value) {
|
||||
if (!value) { return }
|
||||
const newValue = div.querySelector('#swalRender').checked ? '1' : '0'
|
||||
const newValue = div.querySelector('#swalRender').checked ? undefined : '0'
|
||||
if (newValue !== localStorage.render) {
|
||||
localStorage.render = newValue
|
||||
swal('Success!', `Render is now ${newValue === '1' ? 'enabled' : 'disabled'}.`, 'success')
|
||||
newValue ? localStorage.render = newValue : localStorage.removeItem('render')
|
||||
swal('Success!', `Render is now ${newValue ? 'disabled' : 'enabled'}.`, 'success')
|
||||
const element = document.querySelector('body > .render')
|
||||
element.remove()
|
||||
page.doRender()
|
||||
@ -60,7 +60,6 @@ page.doRenderSwal = function () {
|
||||
|
||||
page.doRender = function () {
|
||||
if (!page.renderRoot || !page.renderArray || !page.renderArray.length) { return }
|
||||
if (localStorage.render === undefined) { localStorage.render = '1' }
|
||||
|
||||
let element
|
||||
if (localStorage.render === '0') {
|
||||
|
@ -15,7 +15,7 @@
|
||||
v2: Images and config files (manifest.json, browserconfig.xml, etc).
|
||||
v3: CSS and JS files (libs such as bulma, lazyload, etc).
|
||||
#}
|
||||
{% set v1 = "6MfcbDZldp" %}
|
||||
{% set v1 = "LaPhoISlpS" %}
|
||||
{% set v2 = "Ii3JYKIhb0" %}
|
||||
{% set v3 = "6MfcbDZldp" %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user