Idina music 2026 and I don't want you want it

@mkcdesigner • 0 • 0 • 61 • 20 Sep 2026
Comments 0••
?
No comments yet. Be the first!
Auto-Play
\r\n \r\n "]; window.__bannerRotateEnabled = true; window.__bannerRotateMs = 10000; window.__recordAdImpression = function (opts) { try { var vid = window.__videoId || 0; if (vid <= 0) return; opts = opts || {}; var adId = opts.adId || 0; var slot = opts.slot || ''; var watched = parseFloat(opts.watched || 0); if (watched < 5) return; fetch('record-ad-impression.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, credentials: 'same-origin', body: 'video_id=' + encodeURIComponent(vid) + '&nonce=' + encodeURIComponent(window.__adNonce || '') + '&ad_id=' + encodeURIComponent(adId) + '&slot=' + encodeURIComponent(slot) + '&watched=' + encodeURIComponent(watched) }) .then(function (r) { return r.json(); }) .then(function (data) { if (data && data.ok && data.nonce) { window.__adNonce = data.nonce; } else if (data && !data.ok && data.reason) { console.warn('[ad-impression] rejected:', data.reason); } }) .catch(function(){}); } catch (e) {} }; window.handleAdClose = function () { var isLoggedIn = false; var premiumUrl = 'premium.php'; if (!isLoggedIn) { if (confirm('Sign up or log in to remove all ads with Premium. Continue?')) { window.location.href = 'register.php?redirect=' + encodeURIComponent(premiumUrl); } } else { if (confirm('Go Premium to remove all ads, unlock downloads and HD quality. Upgrade now?')) { window.location.href = premiumUrl; } } }; (function () { try { var light = (document.cookie.indexOf('darkMode=light') !== -1) || (localStorage.getItem('darkMode') === 'light'); document.documentElement.classList.toggle('light-mode', light); document.body.classList.toggle('light-mode', light); } catch (e) {} window.addEventListener('storage', function (e) { if (e.key === 'darkMode') { var light = (e.newValue === 'light'); document.documentElement.classList.toggle('light-mode', light); document.body.classList.toggle('light-mode', light); } }); })(); (function () { try { var saved = localStorage.getItem('videoQuality'); if (!saved || saved === 'Auto') return; var numeric = parseInt(saved, 10); if (isNaN(numeric)) return; if (numeric > window.__userMaxQuality) { localStorage.setItem('videoQuality', '720'); } } catch (e) {} })(); (function(){ var b = document.getElementById('preCommentsBanner'); if (!b) return; var imgs = b.querySelectorAll('img'); if (b.querySelector('video, iframe, ins, .ad-slot-code, script') || imgs.length === 0) { b.style.display = 'flex'; } else { var rem = imgs.length, ok = false, done = false; function settle() { rem--; if (rem > 0) return; done = true; b.style.display = ok ? 'flex' : 'none'; } imgs.forEach(function (img) { if (img.complete) { if (img.naturalWidth > 0) ok = true; settle(); } else { img.addEventListener('load', function () { ok = true; settle(); }); img.addEventListener('error', settle); } }); setTimeout(function () { if (!done) { done = true; b.style.display = 'flex'; } }, 2500); } var pool = Array.isArray(window.__bannerPool) ? window.__bannerPool.slice() : []; var rotateOn = window.__bannerRotateEnabled === true; var rotateMs = parseInt(window.__bannerRotateMs || 30000, 10); var current = null; function pickNext() { if (pool.length === 0) return ''; if (pool.length === 1) return pool[0]; var choice = pool[Math.floor(Math.random() * pool.length)]; var guard = 0; while (choice === current && guard++ < 10) { choice = pool[Math.floor(Math.random() * pool.length)]; } return choice; } function rotate() { if (pool.length === 0) return; var next = pickNext(); if (next === '') return; current = next; b.style.transition = 'opacity .25s ease'; b.style.opacity = '0'; setTimeout(function () { b.innerHTML = next; b.style.opacity = '1'; }, 250); } if (rotateOn && pool.length > 1) { setInterval(rotate, rotateMs); } })(); (function () { var container = document.getElementById('stickyPlayerContainer'); if (!container) return; function updateStuck() { var rect = container.getBoundingClientRect(); var stuck = rect.top <= 0 && window.scrollY > 4; container.classList.toggle('is-stuck', stuck); } window.addEventListener('scroll', updateStuck, { passive: true }); window.addEventListener('resize', updateStuck); updateStuck(); })(); /* ============================================================ VIDEO AD ENGINE ============================================================ */ window.VideoAdEngine = (function () { var state = { adPlaying: false, playingSlots: {} }; function loadVast(vastUrl, onReady, onError) { var proxy = (window.__videoAds && window.__videoAds.proxyUrl) || ''; var fetchUrl = vastUrl; if (proxy) { var nonce = Date.now() + '_' + Math.random().toString(36).slice(2, 10); fetchUrl = proxy + '?url=' + encodeURIComponent(vastUrl) + '&n=' + nonce; } var xhr = new XMLHttpRequest(); xhr.open('GET', fetchUrl, true); xhr.timeout = 9000; xhr.onload = function () { if (xhr.status < 200 || xhr.status >= 300) { onError && onError('http_' + xhr.status); return; } try { var xml = new DOMParser().parseFromString(xhr.responseText, 'text/xml'); if (xml.querySelector('parsererror')) { onError && onError('invalid_xml'); return; } var ads = []; xml.querySelectorAll('Ad').forEach(function (adEl) { var wrapper = adEl.querySelector('VASTAdTagURI'); if (wrapper) { var nestedUrl = (wrapper.textContent || '').trim(); if (nestedUrl) { ads.push({ wrapper: nestedUrl }); return; } } var mediaFiles = adEl.querySelectorAll('MediaFile'); var chosen = null, bestBitrate = -1; mediaFiles.forEach(function (mf) { var type = (mf.getAttribute('type') || '').toLowerCase(); if (type.indexOf('mp4') !== -1 || type.indexOf('webm') !== -1) { var br = parseInt(mf.getAttribute('bitrate') || '0', 10); if (br > bestBitrate) { bestBitrate = br; chosen = (mf.textContent || '').trim(); } } }); if (!chosen && mediaFiles.length) chosen = (mediaFiles[0].textContent || '').trim(); if (!chosen) return; var clickEl = adEl.querySelector('ClickThrough'); var clickUrl = clickEl ? (clickEl.textContent || '').trim() : ''; adEl.querySelectorAll('Impression').forEach(function (imp) { var u = (imp.textContent || '').trim(); if (u) { try { (new Image()).src = u; } catch (e) {} } }); var skipOffset = 5; var linear = adEl.querySelector('Linear'); if (linear && linear.getAttribute('skipoffset')) { var so = linear.getAttribute('skipoffset'); var m = /^(\d+):(\d+):(\d+)$/.exec(so); if (m) skipOffset = parseInt(m[1],10)*3600 + parseInt(m[2],10)*60 + parseInt(m[3],10); else skipOffset = parseInt(so, 10) || 5; } ads.push({ mediaFile: chosen, clickThrough: clickUrl, skipOffset: skipOffset }); }); if (ads.length === 0) { var topMedia = xml.querySelector('MediaFile'); if (topMedia) ads.push({ mediaFile: (topMedia.textContent || '').trim(), clickThrough: '', skipOffset: 5 }); } if (ads.length === 0) { onError && onError('no_media_file'); return; } var resolvedAds = new Array(ads.length); var pending = ads.length; function finalize() { var valid = resolvedAds.filter(function (a) { return a && a.mediaFile; }); if (valid.length === 0) { onError && onError('no_media_file'); return; } onReady(valid); } ads.forEach(function (ad, index) { if (ad.wrapper) { loadVast(ad.wrapper, function (nested) { resolvedAds[index] = (nested && nested[0]) ? nested[0] : null; pending--; if (pending === 0) finalize(); }, function () { resolvedAds[index] = null; pending--; if (pending === 0) finalize(); }); } else { resolvedAds[index] = ad; pending--; if (pending === 0) finalize(); } }); } catch (e) { onError && onError('parse_error'); } }; xhr.onerror = function () { onError && onError('network'); }; xhr.ontimeout = function () { onError && onError('timeout'); }; xhr.send(); } function buildOverlay(html, mode, src, loading, counterLabel) { var box = document.getElementById('videoPlayerBox'); if (!box) return null; var existing = box.querySelector('.watch-video-ad'); if (existing) existing.remove(); var overlay = document.createElement('div'); overlay.className = 'watch-video-ad'; if (loading) { overlay.innerHTML = '
Loading ad…
'; } else if (mode === 'media' && src) { var counter = counterLabel ? ' ' + counterLabel : ''; overlay.innerHTML = '' + '
Advertisement' + counter + '
' + '' + '
0:00
' + '
'; } else { overlay.innerHTML = '
' + html + '
' + '
Advertisement
' + ''; } box.appendChild(overlay); return overlay; } function removeOverlay() { var box = document.getElementById('videoPlayerBox'); if (!box) return; var o = box.querySelector('.watch-video-ad'); if (o) o.remove(); } function play(slotKey, onComplete) { if (!window.__videoAds || !window.__videoAds.enabled) { onComplete && onComplete(); return; } var slot = window.__videoAds.slots && window.__videoAds.slots[slotKey]; if (!slot) { onComplete && onComplete(); return; } if (state.playingSlots[slotKey]) { onComplete && onComplete(); return; } var player = window.plyrPlayer; var mainDuration = player ? (player.duration || 0) : 0; var configDuration = window.__videoAds.mainDuration || 0; var effectiveDuration = mainDuration > 0 ? mainDuration : configDuration; if (effectiveDuration > 0 && effectiveDuration < 15 && slotKey !== 'video_first') { onComplete && onComplete(); return; } state.playingSlots[slotKey] = true; state.adPlaying = true; var savedTime = 0; if (player) { savedTime = player.currentTime || 0; try { player.pause(); } catch (e) {} } if (slot.mode === 'vast' && slot.vastUrl) { buildOverlay('', null, null, true); var didFinish = false; function bail(reason) { if (didFinish) return; didFinish = true; removeOverlay(); state.adPlaying = false; delete state.playingSlots[slotKey]; if (player) { try { player.currentTime = savedTime; var p = player.play(); if (p && typeof p.catch === 'function') p.catch(function(){}); } catch (e) {} } onComplete && onComplete(); } var bailTimer = setTimeout(function () { bail('outer_timeout'); }, 12000); loadVast( slot.vastUrl, function (adList) { clearTimeout(bailTimer); if (didFinish) return; didFinish = true; removeOverlay(); var queue = adList.slice(); var currentIndex = 0; function playNext() { if (currentIndex >= queue.length) { state.adPlaying = false; delete state.playingSlots[slotKey]; if (player) { try { player.currentTime = savedTime; var p = player.play(); if (p && typeof p.catch === 'function') p.catch(function(){}); } catch (e) {} } onComplete && onComplete(); return; } var currentAd = queue[currentIndex]; currentIndex++; var counterLabel = queue.length > 1 ? '(Ad ' + currentIndex + ' of ' + queue.length + ')' : ''; renderAdOverlay(slotKey, { mode: 'media', src: currentAd.mediaFile, clickThrough: currentAd.clickThrough || slot.redirect || '', skipOffset: currentAd.skipOffset, counterLabel: counterLabel }, savedTime, playNext, true); } playNext(); }, function (err) { clearTimeout(bailTimer); bail(err); } ); return; } renderAdOverlay(slotKey, slot, savedTime, onComplete, false); } function renderAdOverlay(slotKey, slot, savedTime, onComplete, isIntermediate) { var player = window.plyrPlayer; var overlay = buildOverlay(slot.html || '', slot.mode, slot.src, false, slot.counterLabel || ''); if (!overlay) { state.adPlaying = false; delete state.playingSlots[slotKey]; onComplete && onComplete(); return; } function finish() { if (isIntermediate) { removeOverlay(); onComplete && onComplete(); return; } state.adPlaying = false; delete state.playingSlots[slotKey]; removeOverlay(); if (player) { try { player.currentTime = savedTime; var p = player.play(); if (p && typeof p.catch === 'function') p.catch(function(){}); } catch (e) {} } onComplete && onComplete(); } var skipBtn = overlay.querySelector('#vastSkipBtn'); if (skipBtn) skipBtn.addEventListener('click', function (e) { e.stopPropagation(); finish(); }); if (slot.mode === 'media' && slot.src) { var adVideo = overlay.querySelector('#vastVideo'); var progress = overlay.querySelector('#vastProgress'); var timer = overlay.querySelector('#vastTimer'); var skipAfter = (typeof slot.skipOffset === 'number' && slot.skipOffset > 0) ? slot.skipOffset : 5; if (skipBtn) skipBtn.style.display = 'none'; setTimeout(function () { if (skipBtn) skipBtn.style.display = ''; }, skipAfter * 1000); function fmt(s) { s = Math.floor(s || 0); return Math.floor(s / 60) + ':' + ('0' + (s % 60)).slice(-2); } adVideo.addEventListener('timeupdate', function () { var d = adVideo.duration || 0, t = adVideo.currentTime || 0; if (d > 0 && progress) progress.style.width = ((t / d) * 100) + '%'; if (timer) timer.textContent = fmt(Math.max(0, d - t)); }); adVideo.addEventListener('ended', finish); adVideo.addEventListener('error', function () { finish(); }); var __adPinged = false; adVideo.addEventListener('timeupdate', function () { if (!__adPinged && adVideo.currentTime >= 5) { __adPinged = true; if (typeof window.__recordAdImpression === 'function') { window.__recordAdImpression({ adId: slot.adId || 0, slot: slotKey, watched: adVideo.currentTime }); } } }); adVideo.play().catch(function () { finish(); }); var clickTarget = slot.clickThrough || slot.redirect || ''; var ctaBadge = document.createElement('div'); ctaBadge.className = 'watch-video-ad-cta'; ctaBadge.textContent = 'Visit now'; if (!clickTarget) ctaBadge.style.opacity = '0.55'; overlay.appendChild(ctaBadge); if (clickTarget) { overlay.style.cursor = 'pointer'; adVideo.style.cursor = 'pointer'; adVideo.addEventListener('click', function (e) { e.stopPropagation(); window.open(clickTarget, '_blank', 'noopener'); }); overlay.addEventListener('click', function (e) { if (e.target.closest('#vastSkipBtn')) return; if (e.target === adVideo) return; window.open(clickTarget, '_blank', 'noopener'); }); } } else { var codeContainer = overlay.querySelector('.watch-video-ad-html'); if (codeContainer) { codeContainer.style.cssText = 'width:100%;height:100%;position:absolute;inset:0;overflow:auto;background:#000;display:flex;align-items:center;justify-content:center;'; codeContainer.querySelectorAll('script').forEach(function (oldScript) { var newScript = document.createElement('script'); if (oldScript.src) { newScript.src = oldScript.src; newScript.async = true; } else newScript.textContent = oldScript.textContent; oldScript.parentNode.replaceChild(newScript, oldScript); }); var rawHtml = slot.html || ''; var scriptRegex = /]*)>([\s\S]*?)<\/script>/gi; var match; while ((match = scriptRegex.exec(rawHtml)) !== null) { var attrs = match[1] || ''; var body = match[2] || ''; var s = document.createElement('script'); var srcMatch = /src\s*=\s*["']([^"']+)["']/i.exec(attrs); if (srcMatch) { s.src = srcMatch[1]; s.async = true; } if (body) s.textContent = body; try { document.head.appendChild(s); } catch (e) {} } if (slot.redirect) { var hasOwnLink = codeContainer.querySelector('a[href]'); if (!hasOwnLink) { codeContainer.style.cursor = 'pointer'; codeContainer.addEventListener('click', function (e) { if (e.target.closest('a, button, iframe, ins')) return; window.open(slot.redirect, '_blank', 'noopener'); }); } } } if (skipBtn) skipBtn.style.display = 'none'; setTimeout(function () { if (skipBtn) skipBtn.style.display = ''; }, 5000); setTimeout(finish, 20000); } } return { play: play, isPlaying: function () { return state.adPlaying; }, shouldPlayMiddle: function () { return window.__videoAds && window.__videoAds.isMedium; }, shouldPlayMovieLoop: function () { return window.__videoAds && window.__videoAds.isMovie; } }; })(); /* ============================================================ PLYR PLAYER INIT ============================================================ */ document.addEventListener('DOMContentLoaded', function() { var videoElement = document.getElementById('plyr-player'); if (!videoElement) return; videoElement.muted = true; videoElement.setAttribute('muted', ''); var allQualities = [2160, 1440, 1080, 720, 480, 360]; var allowedQualities = allQualities.filter(function (q) { return q <= window.__userMaxQuality; }); if (allowedQualities.length === 0) allowedQualities = [360]; var savedQuality = null; try { savedQuality = parseInt(localStorage.getItem('videoQuality'), 10) || null; } catch (e) {} var startQuality = (savedQuality && savedQuality <= window.__userMaxQuality) ? savedQuality : allowedQualities[0]; var player = new Plyr(videoElement, { controls: ['play-large','play','progress','current-time','duration','mute','volume','captions','settings','pip','airplay','fullscreen'], settings: ['quality','speed'], speed: { selected: 1, options: [0.5, 0.75, 1, 1.25, 1.5, 2] }, quality: { default: startQuality, options: allowedQualities, forced: true, onChange: function (newQuality) { try { localStorage.setItem('videoQuality', String(newQuality)); } catch (e) {} if (newQuality > window.__userMaxQuality) { var fallback = window.__userMaxQuality; var msg = 'HD quality (1080p) and above requires Premium. Upgrade now?'; if (confirm(msg)) { var redirect = encodeURIComponent(window.location.pathname + window.location.search); window.location.href = 'premium.php?redirect=' + redirect; } else { try { player.quality = fallback; } catch (e) {} } } } }, autoplay: false, muted: true, keyboard: { focused: true, global: false }, tooltips: { controls: true, seek: true }, captions: { active: false, language: 'en', update: true }, fullscreen: { enabled: true, fallback: true, iosNative: true }, ratio: '16:9', storage: { enabled: false } }); window.plyrPlayer = player; player.on('ready', function() { player.muted = true; player.volume = 1; setTimeout(function() { if (window.__videoAds && window.__videoAds.enabled && window.__videoAds.slots.video_first) { window.VideoAdEngine.play('video_first', function () { var p = player.play(); if (p && typeof p.catch === 'function') p.catch(function(){}); }); } else { var p = player.play(); if (p && typeof p.catch === 'function') p.catch(function(){}); } }, 200); }); var midFired = false; player.on('timeupdate', function () { if (!window.__videoAds || !window.__videoAds.enabled) return; var cur = player.currentTime || 0, dur = player.duration || 0; if (dur <= 0 || dur < 60) return; if (!midFired && window.VideoAdEngine.shouldPlayMiddle() && cur >= dur / 2 && cur < dur / 2 + 2) { midFired = true; window.VideoAdEngine.play('video_middle'); } }); var lastLoopAt = 0; player.on('timeupdate', function () { if (!window.__videoAds || !window.__videoAds.enabled) return; if (!window.VideoAdEngine.shouldPlayMovieLoop()) return; var cur = player.currentTime || 0; var interval = window.__videoAds.movieInterval || 1200; if (cur - lastLoopAt >= interval) { lastLoopAt = cur; window.VideoAdEngine.play('video_every_20min'); } }); player.on('ended', function() { if (window.__videoAds && window.__videoAds.enabled) { window.VideoAdEngine.play('video_last'); } }); setInterval(function () { try { var cur = player.quality; if (cur && parseInt(cur, 10) > window.__userMaxQuality) { player.quality = window.__userMaxQuality; } } catch (e) {} }, 1500); }); function validateComment(form) { if (!window.__feat.comments) { alert('This feature is currently disabled.'); return false; } var ta = form.querySelector('textarea[name="comment_content"]'); if (!ta || ta.value.trim() === '') { ta.focus(); return false; } return true; } function likeVideo(videoId) { if (!window.__feat.likes) { alert('Likes are disabled for this video.'); return; } sendReaction(videoId, 'like'); } function dislikeVideo(videoId) { if (!window.__feat.dislikes) { alert('This feature is currently disabled.'); return; } sendReaction(videoId, 'dislike'); } function sendReaction(videoId, action) { if (!window.__isLoggedIn) { window.location.href = 'login.php?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); return; } fetch(window.location.pathname + window.location.search, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, credentials: 'same-origin', body: 'like_action=' + encodeURIComponent(action) + '&video_id=' + encodeURIComponent(videoId) }) .then(function (r) { return r.json(); }) .then(function (data) { if (!data || !data.success) { if (data && data.message) alert(data.message); return; } var likeBtn = document.getElementById('likeBtn'); var dislikeBtn = document.getElementById('dislikeBtn'); if (action === 'like') { if (data.action === 'liked') { likeBtn.classList.add('active'); dislikeBtn.classList.remove('active'); } else { likeBtn.classList.remove('active'); } } if (action === 'dislike') { if (data.action === 'disliked') { dislikeBtn.classList.add('active'); likeBtn.classList.remove('active'); } else { dislikeBtn.classList.remove('active'); } } updateCounts(data.likes, data.dislikes); }) .catch(function (e) { console.error('[Reaction]', e); }); } function fmtStatNum(n) { n = Number(n) || 0; if (n >= 1000000000) return (n / 1000000000).toFixed(1).replace(/\.0$/, '') + 'B'; if (n >= 1000000) return (n / 1000000).toFixed(1).replace(/\.0$/, '') + 'M'; if (n >= 1000) return (n / 1000).toFixed(1).replace(/\.0$/, '') + 'K'; return n.toLocaleString(); } function updateCounts(likes, dislikes) { likes = Number(likes) || 0; dislikes = Number(dislikes) || 0; var ld = document.getElementById('likeCountDisplay'); var dd = document.getElementById('dislikeCountDisplay'); var lm = document.getElementById('likeCount'); var dm = document.getElementById('dislikeCount'); if (ld) ld.textContent = fmtStatNum(likes); if (dd) dd.textContent = fmtStatNum(dislikes); if (lm) lm.textContent = fmtStatNum(likes); if (dm) dm.textContent = fmtStatNum(dislikes); } function subscribeChannel(channelId) { if (!window.__isLoggedIn) { window.location.href = 'login.php?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); return; } if (!window.__feat.subscriptions) { alert('This feature is currently disabled.'); return; } var btn = document.getElementById('subscribeBtn'); if (!btn) return; btn.disabled = true; var originalText = btn.textContent; fetch('ajax.php?action=subscribe', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, credentials: 'same-origin', body: 'channel_id=' + encodeURIComponent(channelId) }) .then(function (r) { return r.json(); }) .then(function (data) { if (data && data.success) { if (data.subscribed) { btn.textContent = 'Subscribed'; btn.classList.add('subscribed'); } else { btn.textContent = 'Subscribe'; btn.classList.remove('subscribed'); } } else if (data && data.message) { alert(data.message); btn.textContent = originalText; } }) .catch(function () { btn.textContent = originalText; }) .finally(function () { btn.disabled = false; }); } function reportVideo(videoId) { closeMoreMenu(); if (!window.__isLoggedIn) { window.location.href = 'login.php?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); return; } window.location.href = 'report-video.php?id=' + videoId; } function shareVideo(videoId) { if (!window.__feat.sharing) { alert('Sharing is disabled for this video.'); return; } var url = window.location.href; var title = "Idina music 2026 and I don't want you want it"; if (navigator.share) { navigator.share({ title: title, text: 'Watch this video!', url: url }).catch(function () {}); return; } if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(url).then(function () { alert('Video link copied to clipboard!'); }); return; } var input = document.createElement('textarea'); input.value = url; document.body.appendChild(input); input.select(); try { document.execCommand('copy'); alert('Video link copied to clipboard!'); } catch (e) { prompt('Copy:', url); } input.remove(); } function openMoreMenu() { var m = document.getElementById('moreMenuOverlay'); if (m) m.classList.add('active'); } function closeMoreMenu() { var m = document.getElementById('moreMenuOverlay'); if (m) m.classList.remove('active'); } function toggleAutoPlay(ev) { if (ev) ev.stopPropagation(); var t = document.getElementById('autoPlayToggle'); if (!t) return; t.classList.toggle('active'); var enabled = t.classList.contains('active'); document.cookie = 'autoplay=' + (enabled ? '1' : '0') + '; path=/; max-age=31536000; SameSite=Lax'; if (enabled && window.plyrPlayer) { window.plyrPlayer.muted = true; window.plyrPlayer.play().catch(function () {}); } } function saveVideo(videoId) { closeMoreMenu(); if (!window.__isLoggedIn) { window.location.href = 'login.php?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); return; } var fd = new FormData(); fd.append('action', 'save_video'); fd.append('video_id', videoId); fetch(window.location.pathname + window.location.search, { method: 'POST', body: fd, credentials: 'same-origin' }) .then(function (r) { return r.json(); }) .then(function (data) { if (data.success) alert(data.already ? 'Already in your library.' : 'Video saved to your library!'); else alert('Failed to save. Please try again.'); }) .catch(function () { alert('Failed to save. Please try again.'); }); } function downloadVideo(videoId) { closeMoreMenu(); if (window.__isYoutube) { alert('Download not available for YouTube videos'); return; } if (!window.__isLoggedIn) { window.location.href = 'login.php?redirect=' + encodeURIComponent(window.location.pathname + window.location.search); return; } if (!window.__feat.premium) { alert('This feature is currently disabled.'); return; } if (!window.__isPremium) { alert('Upgrade to Premium to download this video.'); return; } window.location.href = 'download.php?serve=' + videoId; } document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closeMoreMenu(); });