Spaces:
Running
Running
Download script.js from gutzu1015/adminbot-brainhub: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/spaces/gutzu1015/adminbot-brainhub/resolve/main/script.js
- Command line
-
hf download hf://spaces/gutzu1015/adminbot-brainhub/script.js
-
curl -L -o script.js https://huggingface.co/spaces/gutzu1015/adminbot-brainhub/resolve/main/script.js
743 Bytes
| // Main script file for the admin dashboard | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize feather icons | |
| if (typeof feather !== 'undefined') { | |
| feather.replace(); | |
| } | |
| // Update header user name if custom-header is present | |
| const customHeader = document.querySelector('custom-header'); | |
| if (customHeader && customHeader.shadowRoot) { | |
| const userNameEl = customHeader.shadowRoot.querySelector('.user-name'); | |
| if (userNameEl) { | |
| // Try to get from localStorage, otherwise default | |
| const storedName = localStorage.getItem('userName'); | |
| if (storedName) { | |
| userNameEl.textContent = storedName; | |
| } | |
| } | |
| } | |
| }); | |