Создай сайт к которому можно подключить тон кошелек, после чего будет отображаться его реальный баланс в TON
423d496 verified Download script.js from Timofey10019182/dark-mode-button-wizard: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/spaces/Timofey10019182/dark-mode-button-wizard/resolve/main/script.js
- Command line
-
hf download hf://spaces/Timofey10019182/dark-mode-button-wizard/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Timofey10019182/dark-mode-button-wizard/resolve/main/script.js
669 Bytes
| // Theme toggle functionality | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const html = document.documentElement; | |
| // Check for saved theme preference or use system preference | |
| const savedTheme = localStorage.getItem('theme'); | |
| const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; | |
| if (savedTheme === 'dark' || (!savedTheme && systemPrefersDark)) { | |
| html.classList.add('dark'); | |
| } else { | |
| html.classList.remove('dark'); | |
| } | |
| // Listen for button click (handled in component) | |
| }); | |
| // Initialize TonConnect | |
| if (window.TonConnect) { | |
| window.tonconnect = new TonConnect(); | |
| } | |