|
|
| |
| document.addEventListener('DOMContentLoaded', () => { |
| |
| const supportForm = document.getElementById('supportForm'); |
| if (supportForm) { |
| supportForm.addEventListener('submit', function(e) { |
| e.preventDefault(); |
| |
| const formData = { |
| name: document.getElementById('name').value, |
| email: document.getElementById('email').value, |
| phone: document.getElementById('phone').value, |
| message: document.getElementById('message').value, |
| urgent: document.getElementById('urgent').checked |
| }; |
| |
| |
| console.log('Support request submitted:', formData); |
| |
| |
| const successMsg = document.getElementById('formSuccess'); |
| if (successMsg) { |
| successMsg.classList.remove('hidden'); |
| supportForm.reset(); |
| successMsg.scrollIntoView({ behavior: 'smooth' }); |
| |
| |
| setTimeout(() => { |
| successMsg.classList.add('hidden'); |
| }, 5000); |
| } |
| }); |
| } |
|
|
| |
| const loadTranslateStyles = () => { |
| const iframe = document.querySelector('.goog-te-menu-frame'); |
| if (!iframe) return; |
| |
| const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; |
| const style = iframeDoc.createElement('style'); |
| style.textContent = ` |
| .goog-te-menu2 { |
| font-family: 'Montserrat', sans-serif !important; |
| background-color: #111827 !important; |
| border: 1px solid #e3b341 !important; |
| } |
| .goog-te-menu2-item div, .goog-te-menu2-item-selected div { |
| color: white !important; |
| padding: 8px 16px !important; |
| } |
| .goog-te-menu2-item-selected { |
| background-color: rgba(227, 179, 65, 0.2) !important; |
| } |
| .goog-te-menu2-item:hover { |
| background-color: rgba(227, 179, 65, 0.1) !important; |
| } |
| `; |
| iframeDoc.head.appendChild(style); |
| }; |
|
|
| |
| const translateInterval = setInterval(() => { |
| if (document.querySelector('.goog-te-menu-frame')) { |
| loadTranslateStyles(); |
| clearInterval(translateInterval); |
| } |
| }, 100); |
|
|
| |
| const starsCount = 200; |
| for (let i = 0; i < starsCount; i++) { |
| const star = document.createElement('div'); |
| star.className = 'star'; |
| star.style.width = `${Math.random() * 3 + 1}px`; |
| star.style.height = star.style.width; |
| star.style.left = `${Math.random() * 100}%`; |
| star.style.top = `${Math.random() * 100}%`; |
| star.style.animationDelay = `${Math.random() * 3}s`; |
| document.body.appendChild(star); |
| } |
| |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { |
| anchor.addEventListener('click', function (e) { |
| e.preventDefault(); |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ |
| behavior: 'smooth' |
| }); |
| }); |
| }); |
| }); |