function injectIframe(imdb) { const videoSources = [ { name: 'SERVER_1', url: `https://vidlink.pro/tv/4709/2/` }, { name: 'SERVER_2', url: `https://player.autoembed.cc/embed/tv/4709/2/` }, { name: 'SERVER_3', url: `https://vidsrc.vip/embed/tv/4709/2/` }, { name: 'SERVER_4', url: `https://embed.su/embed/tv/4709/2/` }, { name: 'SERVER_5', url: `https://www.primewire.tf/embed/tv?tmdb=4709&season=2&episode=` } ]; var playMovieDiv = document.getElementById('playmovie'); var videoSourcesDiv = document.getElementById('videoSources'); if (playMovieDiv && videoSourcesDiv) { var iframe = document.createElement('iframe'); iframe.src = videoSources[0].url; iframe.width = '100%'; iframe.height = '100%'; iframe.frameBorder = '0'; iframe.allowFullscreen = true; iframe.referrerPolicy = 'origin'; playMovieDiv.innerHTML = ''; playMovieDiv.appendChild(iframe); videoSourcesDiv.innerHTML = ''; videoSources.forEach((source, index) => { var button = document.createElement('button'); button.innerText = source.name; button.className = 'server-btn'; button.style.backgroundColor = index === 0 ? '#007bff' : '#ccc'; button.style.color = index === 0 ? '#fff' : '#000'; button.addEventListener('click', function() { iframe.src = source.url; document.querySelectorAll('#videoSources button').forEach(btn => { btn.style.backgroundColor = '#ccc'; btn.style.color = '#000'; }); button.style.backgroundColor = '#007bff'; button.style.color = '#fff'; }); videoSourcesDiv.appendChild(button); }); window.scrollTo(0, 0); } else { console.error('Issue finding video player'); } } injectIframe('');