Spaces:
Running
Running
Download script.js from muhammed32/gemini-ui-clone: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/spaces/muhammed32/gemini-ui-clone/resolve/main/script.js
- Command line
-
hf download hf://spaces/muhammed32/gemini-ui-clone/script.js
-
curl -L -o script.js https://huggingface.co/spaces/muhammed32/gemini-ui-clone/resolve/main/script.js
770 Bytes
| document.addEventListener('DOMContentLoaded', function() { | |
| const searchInput = document.querySelector('input'); | |
| const searchButton = document.querySelector('button.bg-red-600'); | |
| searchInput.addEventListener('focus', function() { | |
| this.parentElement.classList.add('shadow-md'); | |
| }); | |
| searchInput.addEventListener('blur', function() { | |
| this.parentElement.classList.remove('shadow-md'); | |
| }); | |
| const performSearch = () => { | |
| alert('YouTube search would be performed for: ' + searchInput.value); | |
| }; | |
| searchInput.addEventListener('keydown', function(e) { | |
| if (e.key === 'Enter') { | |
| performSearch(); | |
| } | |
| }); | |
| searchButton.addEventListener('click', performSearch); | |
| }); | |