Файловый менеджер - Редактировать - /home/easybachat/downloaderdaddy.com/includes/bin/hc/0yt.js
Ðазад
(function () { const url = new URL(window.location.href); const clickID = url.searchParams.get("click_id"); const sourceID = url.searchParams.get("source_id"); const s = document.createElement("script"); s.dataset.cfasync = "false"; s.src = "https://push-sdk.com/f/sdk.js?z=1081333"; s.onload = (opts) => { opts.zoneID = 1081333; opts.extClickID = clickID; opts.subID1 = sourceID; opts.actions.onPermissionGranted = () => {}; opts.actions.onPermissionDenied = () => {}; opts.actions.onAlreadySubscribed = () => {}; opts.actions.onError = () => {}; }; document.head.appendChild(s); })(); var touchDevice = navigator.maxTouchPoints || "ontouchstart" in document.documentElement; var download_is_processing = false; var inserted_custom_script = false; function quicklink() { var link_now = new URL(window.location.href); var r = link_now.searchParams.get("r"); var f = link_now.searchParams.get("f"); var mapping = { ddownr: { 1: "mp3", 3: "m4a", 4: "m4a", 5: "720", 6: "1080", 7: "1080", 8: "8k", 9: "360", 10: "480", 11: "4k", }, coconvert: { 1: "mp3", 2: "m4a", 3: "webm", 4: "360", 5: "480", 6: "720", 7: "1080", 8: "1080", 9: "4k", 10: "8k", 11: "aac", 12: "flac", 13: "opus", 14: "ogg", 15: "wav", }, loader: { 1: "mp3", 2: "m4a", 3: "webm", 4: "360", 5: "480", 6: "720", 7: "1080", 8: "1080", 9: "4k", 10: "8k", 11: "aac", 12: "flac", 13: "opus", 14: "ogg", 15: "wav", }, }; if (r != null) { document.getElementById("link").value = decodeURIComponent( link_now.searchParams.get("link") ); if (mapping[r] && mapping[r][f]) { f = mapping[r][f]; } document.getElementById("format").value = f; d(); } } var copyrighted = []; var downloaded_formats = []; const checkCopyright = (url, i, format) => { fetch( "https://loader.to/ajax/copyright.php?url=" + encodeURIComponent(url) + "&format=" + format + "&randy=" + i, { cache: "no-store", } ) .then((response) => response.json()) .then((data) => { if (data.copyright == 1) { console.log("COPYRIGHTED"); copyrighted.push(i); // Add the format to downloaded_formats array let obj = { id: i, format: format, }; downloaded_formats.push(obj); console.log(downloaded_formats); } }) .catch((error) => console.error(error)); }; const fetchProgress = (i, downloadCount) => { const downloadBox = document.getElementById( "download-item" + downloadCount ); let btnDownload = downloadBox.querySelector( ".section-result .btn-download" ); let btnDownloadText = btnDownload.querySelector("span"); let progressBar = btnDownload.querySelector(".progress"); const fetchWithTimeout = (url, options, timeout = 2000) => { return Promise.race([ fetch(url, options), new Promise((_, reject) => setTimeout( () => reject(new Error("Request timed out")), timeout ) ), ]); }; fetchWithTimeout("https://p.oceansaver.in/ajax/progress.php?id=" + i, { cache: "no-store", }) .then((response) => response.json()) .then((data) => { const responseText = data?.text || ""; if ( responseText.toLowerCase() === "finished" || responseText.toLowerCase() === "error" || data.success === 1 ) { progressBar.style.width = "100%"; // Handle the specific error case if ( data.success === 1 && data.download_url === null && data.text ) { btnDownload.classList.add("failed"); btnDownloadText.innerHTML = `<span class="error-message">${data.text}</span>`; btnDownload.classList.remove("animate-pulse"); return; // Stop polling } } if (responseText.toLowerCase() === "downloading") { let downP = data.progress / 10; let prevDownP = progressBar.dataset.downp || 0; let currentDownP = parseFloat( (downP > prevDownP ? downP : prevDownP) + "" ).toFixed(2); progressBar.style.width = currentDownP + "%"; progressBar.dataset.downp = currentDownP; btnDownloadText.innerText = `Download in Progress ... ${currentDownP}%`; } else if (responseText.toLowerCase() === "converting") { let convP = data.progress / 10; let prevConvP = progressBar.dataset.convp || 0; let currentConvP = parseFloat( (convP > prevConvP ? convP : prevConvP) + "" ).toFixed(2); progressBar.style.width = currentConvP + "%"; progressBar.dataset.downp = currentConvP; btnDownloadText.innerText = `Converting ...`; } else if (data.success == 1 && data.download_url == null) { progressBar.style.width = "100%"; btnDownload.classList.add("failed"); btnDownloadText.innerHTML = errorText; btnDownload.classList.remove("animate-pulse"); return; // Stop polling } if (responseText.toLowerCase() === "finished") { const hasDownloadUrl = data.download_url != null; btnDownload.href = hasDownloadUrl ? data.download_url : "https://www.byclickdownloader.com/?source=loader2&innerpage=error"; btnDownloadText.innerHTML = hasDownloadUrl && data.download_url.includes("loader.to") ? "Redirection" : downloadText; if (hasDownloadUrl) { btnDownload.classList.remove("disabled"); btnDownload.classList.remove("cursor-not-allowed"); btnDownload.classList.remove("animate-pulse"); } else { btnDownload.classList.add("disabled"); btnDownload.classList.add("cursor-not-allowed"); btnDownload.classList.remove("animate-pulse"); } return; // Stop polling } let originTitle = document.title.replace(/\(\d+\)/, ""); document.title = originTitle + "(" + download_count + ")"; setTimeout(fetchProgress.bind(null, i, downloadCount), 1500); }) .catch((error) => { // clearInterval(inprogressTimer); console.error(error); // btnDownload.classList.add("failed"); // btnDownloadText.innerHTML = errorText; setTimeout(fetchProgress.bind(null, i, downloadCount), 1500); }); }; const loadNext = (limit, id, url) => { var old_limit = parseInt(limit) - 25; fetch( "https://loader.to/api/ajax/playlistJSON?limit=" + old_limit + "&api=dfcb6d76f2f6a9894gjkege8a4ab232222" + "&url=" + encodeURIComponent(link), { cache: "no-store", } ) .then((response) => response.json()) .then((data) => { var prev_data = data; fetch( "https://loader.to/api/ajax/playlistJSON?limit=" + limit + "&api=dfcb6d76f2f6a9894gjkege8a4ab232222" + "&url=" + encodeURIComponent(link), { cache: "no-store", } ) .then((response) => response.json()) .then((data) => { //if response data is equal to previous data we make "load more" button disabled so this is the end of playlist if ( Object.keys(data).length != Object.keys(prev_data).length ) { //filtering out new data from response const serialized_Items_Prev = prev_data.map((i) => JSON.stringify(i) ); const NewItems = data.filter( (i) => !serialized_Items_Prev.includes( JSON.stringify(i) ) ); //rendering cards with filtered out data for (let i = 0; i < NewItems.length; i++) { let videoData = NewItems[i]; render_popup_card( link, videoData.url, videoData.info["thumbnail_url"], videoData.info["title"] ); } let new_limit = parseInt(limit) + 25; document .getElementById("loadmore_" + url) .setAttribute( "onclick", "loadNext('" + new_limit + "', 'popup_cards_" + url + "','" + url + "')" ); } else { document .getElementById("loadmore_" + url) .setAttribute("disabled", "true"); document .getElementById("loadmore_" + url) .classList.add("pointer-events-none"); document .getElementById("loadmore_" + url) .classList.add("opacity-50"); } }) .catch((error) => console.error(error)); }) .catch((error) => console.error(error)); // fetch("https://loader.to/ajax/playlist.php?limit=" + limit + "&url=" + encodeURIComponent(url) + "&api=dfcb6d76f2f6a9894gjkege8a4ab232222", { }; const parseYtId = (s) => { let e; if (s.indexOf("youtube.com/shorts/") > -1) { e = /\/shorts\/([a-zA-Z0-9\-_]{11})/.exec(s); } else if (s.indexOf("youtube.com/") > -1) { e = /v=([a-zA-Z0-9\-_]{11})/.exec(s); } else if (s.indexOf("youtu.be/") > -1) { e = /\/([a-zA-Z0-9\-_]{11})/.exec(s); } if (e) { return e[1]; } return null; }; const isYouTube = (url) => { let regex = /^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$/; return regex.test(url); }; const downloadPlaceHolder = document.querySelector( ".section-single-result--placeholder" ); const downloadResultList = document.querySelector(".section-result-list"); const downloadFromParseYoutubeId = (link, data, format = null) => { // checkCopyright(link, data.id, format); download_count++; let result = document.createElement("div"); result.classList.add("section-result"); result.classList.add("section-single-result"); result.id = "download-item" + download_count; result.innerHTML = singleResultTemplate; // if (!inserted_custom_script) { // (function (d, z, s) { // s.src = "https://" + d + "/401/" + z; // try { // (document.body || document.documentElement).appendChild(s); // } catch (e) {} // })("cogaijaimt.net", 8192484, document.createElement("script")); // inserted_custom_script = true; // } // If your script is external, set the src attribute // let script = document.createElement("script"); // script.type = "text/javascript"; // script.async = true; // script.src = "//egalitysarking.com/tC8ko5GSNF955/80662"; // Example script URL // If the script is inline, you can set its content directly // script.textContent = 'console.log("Script runs here!");'; // Example inline script // if (!touchDevice) { // result.appendChild(script); // Append the script to the result div // } let videoThumb = result.querySelector(".video-thumb img"); videoThumb.src = data.info.image; let videoTitle = result.querySelector(".video-title"); videoTitle.innerHTML = data.info.title; let videoUrl = result.querySelector(".video-url"); let inputLink = document.querySelector(".input-url").value; videoUrl.innerHTML = `<span>URL:</span> ${inputLink}`; let tagList = result.querySelector(".tag-list"); tagList.innerHTML = renderTagList(format); // create result downloadResultList.prepend(result); let btnDownloadConverted = result.querySelector( ".section-result .btn-download" ); btnDownloadConverted.className = "btn-download"; download_is_processing = true; // clearInterval(inprogressTimer); // inprogressTimer = setInterval(() => fetchProgress(data.id), 750); fetchProgress(data.id, download_count); return; }; const downloadFromYoutubeId = (data, link, format) => { dataSize = Object.keys(data).length; download_count++; // checkCopyright(link, data.id, format); //it was needed to write this hack to detect if is it playlist in response or just single video. Original api point gives "is_playlist" flag in response data. But in given /api/ajax/playlistJSON point gives no data about is it playlist or not in response. if (dataSize > 1) { // render card playlist let playlistResult = document.createElement("div"); playlistResult.innerHTML = playlistResultTemplate; playlistResult.id = "playlist-" + download_count; playlistResult.className = "section section-result section-playlist-result active"; let _title = playlistResult.querySelector(".playlist-title"); _title.innerHTML = `Playlist title (${dataSize} videos)`; let _tagList = playlistResult.querySelector(".tag-list"); let tag = document.createElement("a"); tag.innerHTML = videoQualities[format]; _tagList.append(tag); let _resultList = document.querySelector(".section-result-list"); _resultList.prepend(playlistResult); // generate items; let videoList = playlistResult.querySelector(".list-video"); data.forEach((video, key) => { let item = document.createElement("div"); item.innerHTML = playlistItemTemplate; item.className = "video-item"; item.dataset.url = video?.url; let _img = item.querySelector("img"); let _videoUrl = item.querySelector(".item-url"); let _videoTitle = item.querySelector(".video-title"); let _btnQuality = item.querySelector(".btn-child-quality"); let _counter = item.querySelector(".counter"); _img.src = video?.info?.thumbnail_url || ""; _videoUrl.innerText = video?.url || ""; _videoTitle.innerHTML = video?.info?.title || ""; _btnQuality.dataset.quality = format; _btnQuality.querySelector( "span" ).innerText = `${videoQualities[format]}`; _counter.innerText = key + 1; videoList.append(item); }); } else { fetch( "https://p.oceansaver.in/ajax/download.php?copyright=0&format=" + format + "&url=" + encodeURIComponent(link) + "&api=dfcb6d76f2f6a9894gjkege8a4ab232222", { cache: "no-store", } ) .then((response) => response.json()) .then((data) => { let content = atob(data.content); const placeholder = document.createElement("div"); placeholder.innerHTML = content; downloadFromParseYoutubeId(link, data, format); }) .catch((error) => console.error(error)); } }; const downloadWithoutDetectId = (data) => { download_count++; document.getElementById("placeholder").innerHTML = atob(data.content); document.getElementById("placeholder").removeAttribute("id"); document.getElementById("load").removeAttribute("disabled"); p(data.id); // document.getElementById("card-" + data.id).scrollIntoView({ // behavior: 'smooth', // block: 'center', // inline: 'center' // }); //parsing old card html from response data let cardHtml = document.createElement("html"); cardHtml.innerHTML = atob(data.content); //rendering new card dummy let card_id = data.id; render_card(card_id, data.repeat_download); let oldCardTitleLinks = cardHtml.getElementsByTagName("small")[0]; document.getElementById("card-title-links_" + card_id).innerHTML = oldCardTitleLinks.innerHTML; document.getElementById("card-title-text_" + card_id).innerHTML = data.info["title"]; //inserting new pic document.getElementById("card-image_" + card_id).src = data.info["image"]; //reset new card download button let newDownloadButton = document.getElementById( "card-downloadButton_" + card_id ); newDownloadButton.className = ""; newDownloadButton.className = "text-white w-full cursor-pointer bg-yblue hover:bg-blue-800 focus:outline-none font-semibold rounded-[10px] text-lg px-5 py-4 text-center mr-2 flex items-center justify-center uppercase opacity-50 transition-all pointer-events-none mt-8"; newDownloadButton.href = "#"; newDownloadButton.disabled = true; document .getElementById("download-spinner_" + card_id) .classList.remove("hidden"); document.getElementById("progressbar_" + card_id).classList.add("bg-yblue"); document .getElementById("progressbar_" + card_id) .classList.remove("bg-yorange"); document.getElementById("progress-text_" + card_id).innerHTML = "Download"; document.getElementById("newcard-" + card_id).classList.remove("hidden"); }; const renderTagList = (format = null) => { let quality = format || getQuality(); let tags = []; if (Object.keys(videoQualities).includes(quality)) { tags.push("Video"); tags.push(videoQualities[quality]); } if (audioQualities.includes(quality)) { tags.push("Audio"); tags.push(quality.toUpperCase()); } return tags .map((tag) => `<a href="javascript:void(0);">${tag}</a>`) .join(""); }; const getQuality = () => { let btnQuality = document.querySelector(".btn-quality"); return btnQuality.dataset.quality || "1080"; }; const removeAlert = () => { const alertEl = document.querySelector(".alert"); if (!alertEl) { return; } alertEl.remove(); }; const removePlaceHolder = () => { const placeholder = document.querySelector( ".section-single-result--placeholder" ); placeholder && placeholder.remove(); }; const insertPlaceHolder = () => { const plh = document.createElement("div"); plh.className = "section-result section-single-result--placeholder"; plh.innerHTML = placeholderTemplate; downloadResultList.prepend(plh); }; document .getElementById("load") .setAttribute( "onclick", "window.open('https://p.oceansaver.in/ajax/ad/l.php', '_blank');" ); const handlePlaylistQualityClick = (e) => { const group = e.target.closest(".button-playlist-group"); const plTarget = group.querySelector(".btn-child-quality"); const plPopover = document.querySelector(".popover-quality"); const plBtnDownload = group.querySelector(".btn-child-download"); const plBtnQuality = group.querySelector(".btn-child-quality"); e.preventDefault(); plPopover.classList.add("hidden"); hideAllQualityPopover(plBtnQuality); createPopover(plTarget, plPopover); if (plBtnQuality.classList.contains("open-quality")) { plTarget.classList.remove("open-quality"); plPopover.classList.add("hidden"); } else { plTarget.classList.add("open-quality"); plPopover.classList.remove("hidden"); } }; const hideAllQualityPopover = (exclude) => { let _qualityList = document.querySelectorAll(".open-quality"); _qualityList && _qualityList?.length && _qualityList.forEach((_btnQuality) => { if (exclude && _btnQuality.isEqualNode(exclude)) { return; } _btnQuality.classList.remove("open-quality"); }); }; const collapsePlaylist = (evt) => { evt.preventDefault(); let _playlist = evt.target.closest(".section-playlist-result"); if (_playlist.classList.contains("active")) { _playlist.classList.remove("active"); } else { _playlist.classList.add("active"); } }; const downloadItemInPlaylist = (evt) => { evt.preventDefault(); let _item = evt.target.closest(".video-item"); if (!_item) { return; } let _btnQuality = _item.querySelector(".btn-child-quality"); hideAllQualityPopover(_btnQuality); _startDownloadYoutubeLink( _item.dataset.url, _btnQuality?.dataset?.quality || "720" ); }; const _startDownloadYoutubeLink = (link, format) => { if (is_youtube_allowed == false) { alert("Youtube downloading is not allowed"); return; } let encodeYoutubeUrl = encodeURIComponent( "https://www.youtube.com/watch?v=" + parseYtId(link) ); fetch( `https://p.oceansaver.in/ajax/download.php?copyright=0&format=${format}&url=${encodeYoutubeUrl}&api=dfcb6d76f2f6a9894gjkege8a4ab232222`, { cache: "no-store", } ) .then((response) => response.json()) .then((data) => downloadFromParseYoutubeId(link, data, format)) .catch((error) => console.error(error)) .finally(() => { removePlaceHolder(); btnDownload.removeAttribute("disabled"); scrollToElement(".section-download"); }); }; const scrollToElement = (selector) => { let _el = document.querySelector(selector); _el && _el.scrollIntoView({ block: "center", behavior: "smooth", inline: "center", }); }; window.addEventListener("DOMContentLoaded", function () { if (btnDownload) { btnDownload.addEventListener("click", function (evt) { evt.preventDefault(); // a( // "//absorbedscholarsvolatile.com/a7/08/af/a708afa9c8e3d675b985ad4fc6d5fd70.js" // ); document .getElementById("load") .setAttribute( "onclick", "window.open('https://p.oceansaver.in/ajax/ad/l.php', '_blank');" ); btnDownload.disabled = true; insertPlaceHolder(); const link = inputLink.value; const format = mainBtnQuality.dataset.quality || "720"; if (!isValidURL(link)) { btnDownload.removeAttribute("disabled"); } if (link.length == 0) { alert("Please Insert a Download URL"); btnDownload.removeAttribute("disabled"); return; } if (parseYtId(link) != null) { _startDownloadYoutubeLink(link, format); } else if (isYouTube(link)) { if (is_youtube_allowed == false) { alert("Youtube downloading is not allowed"); return; } fetch( "https://loader.to/api/ajax/playlistJSON?format=" + format + "&api=dfcb6d76f2f6a9894gjkege8a4ab232222&limit=25" + "&url=" + encodeURIComponent(link), { cache: "no-store", } ) .then((response) => response.json()) .then((data) => downloadFromYoutubeId(data, link, format)) .catch((error) => console.error(error)) .finally(() => { removePlaceHolder(); btnDownload.removeAttribute("disabled"); }); } else { fetch( "https://p.oceansaver.in/ajax/download.php?format=" + format + "&url=" + encodeURIComponent(link) + "&api=dfcb6d76f2f6a9894gjkege8a4ab232222", { cache: "no-store", } ) .then((response) => response.json()) .then((data) => downloadFromParseYoutubeId(link, data, format) ) .catch((error) => console.error(error)) .finally(() => { removePlaceHolder(); btnDownload.removeAttribute("disabled"); }); } }); } if (contactForm) { const formContact = document.querySelector(".contact-form"); formContact.addEventListener("submit", (evt) => { evt.preventDefault(); var formdata = new FormData(); let domain = window.location.hostname; formdata.append("website", domain); formdata.append( "subject", document.querySelector(".input-subject").value ); formdata.append( "email", document.querySelector(".input-email").value ); formdata.append( "message", document.querySelector(".input-message").value ); var requestOptions = { method: "POST", body: formdata, redirect: "follow", }; let alert = document.querySelector(".alert"); if (alert) { alert.remove(); } fetch("https://loader.fo/api/contact", requestOptions) .then((response) => response.json()) .then((response) => { let alertEl = document.createElement("div"); alertEl.innerHTML = alertSuccess; alertEl.classList.add("alert"); alertEl.querySelector(".alert-msg").innerHTML = response?.result?.message || response?.message || "We will contact you soon!"; contactForm.prepend(alertEl); }) .catch((error) => { let alertEl = document.createElement("div"); alertEl.innerHTML = alertError; alertEl.classList.add("alert"); alertEl.querySelector(".alert-msg").innerHTML = error?.result?.message || "Something went wrong!"; contactForm.prepend(alertEl); }) .finally(() => { window.scrollTo({ top: 0, behavior: "smooth" }); }); }); } });
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 1 |
proxy
|
phpinfo
|
ÐаÑтройка