diff options
| author | Fuwn <[email protected]> | 2024-01-27 02:37:02 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-27 02:37:02 -0800 |
| commit | 676a837c3a6f660aaf9747af6e99cf5ed3c33c11 (patch) | |
| tree | b96ccd3f98b06b84058f7c5d500c96d913025f95 /src/app.html | |
| parent | feat(settings): more helpers (diff) | |
| download | due.moe-676a837c3a6f660aaf9747af6e99cf5ed3c33c11.tar.xz due.moe-676a837c3a6f660aaf9747af6e99cf5ed3c33c11.zip | |
refactor(settinsg): reverse mai title
Diffstat (limited to 'src/app.html')
| -rw-r--r-- | src/app.html | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/app.html b/src/app.html index 1bc15d88..a9f73a38 100644 --- a/src/app.html +++ b/src/app.html @@ -80,10 +80,12 @@ ></script> <script> + aoButa = ''; + document.addEventListener('DOMContentLoaded', () => { const mai = document.getElementById('mai'); - let aoButa = JSON.parse(localStorage.getItem('settings')).displayAoButa; + aoButa = JSON.parse(localStorage.getItem('settings')).displayAoButa; mai.style.display = 'block'; if (aoButa === 'random') { @@ -119,13 +121,13 @@ } switch (aoButa) { - case 'mai': + case 'mai_2': { mai.src = '/aobuta/mai.png'; mai.alt = 'Mai Sakurajima'; } break; - case 'mai_2': + case 'mai': { mai.src = '/aobuta/mai_2.webp'; mai.alt = 'Mai Sakurajima'; @@ -184,7 +186,10 @@ <body data-sveltekit-preload-data="hover" style="max-width: 97.5% !important"> <div style="display: contents">%sveltekit.body%</div> - <img id="mai" onclick="alert('You\'re having lewd thoughts, aren\'t you?')" /> + <img + id="mai" + onclick="aoButa === 'mai_2' ? alert('You\'re having lewd thoughts, aren\'t you?') : undefined" + /> <noscript> <p>Please enable JavaScript to continue using this application.</p> |