您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Watch theYNC Underground videos without needing an account
当前为
// ==UserScript== // @name theYNC.com Underground bypass // @description Watch theYNC Underground videos without needing an account // @require https://update.greatest.deepsurf.us/scripts/421384/1134973/GM_fetch.js // @grant GM_xmlhttpRequest // @connect media.theync.com // @namespace Violentmonkey Scripts // @match https://*.theync.com/* // @match https://*.theync.net/* // @match https://*.theync.com/* // @match https://theync.com/* // @match https://theync.net/* // @match https://theync.com/* // @grant none // @version 2.2 // @license MIT // @author - // ==/UserScript== function getTheYNCVideoURL(url) { for (const [, group_url] of url.matchAll( /\/media\/thumbs\/(.*?)\.[a-zA-Z0-9_.-]*\//gm )) { return `https://media.theync.com/videos/${group_url}.mp4`; } } function waitForElement(selector) { return new Promise((resolve) => { { const element = document.querySelector(selector); if (element) { return resolve(element); } } const observer = new MutationObserver(() => { const element = document.querySelector(selector); if (element) { observer.disconnect(); resolve(element); } }); // If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336 observer.observe(document.body, { childList: true, subtree: true, }); }); } waitForElement(".content-block").then((contentBlock) => { for (const element of contentBlock.querySelectorAll( ".upgrade-profile > .upgrade-info-block" )) { const thumbnailURL = element.querySelector( ".image-block > .image > img" ).src; if (!thumbnailURL) continue; const videoURL = getTheYNCVideoURL(thumbnailURL); if (!videoURL) continue; GM_fetch(videoURL, { method: "head" }).then((response) => { if (response.status !== 200) { return; } location.href = videoURL; }); return; } for (const element of contentBlock.querySelectorAll(".inner-block > a")) { const undergroundLogo = element.querySelector(".item-info > .border-gold"); if (!undergroundLogo) continue; const thumbnailURL = element.querySelector(".image > img").src; if (!thumbnailURL) continue; const videoURL = getTheYNCVideoURL(thumbnailURL); if (!videoURL) continue; GM_fetch(videoURL, { method: "head" }).then((response) => { if (response.status === 200) { undergroundLogo.textContent = "BYPASSED"; undergroundLogo.style.backgroundColor = "green"; element.href = videoURL; return; } GM_fetch(`https://archive.org/wayback/available?url=${element.href}`, { method: "GET", }) .then((response) => response.json()) .then(({ archived_snapshots }) => { if (!archived_snapshots.closest) { return; } undergroundLogo.textContent = "ARCHIVED"; undergroundLogo.style.backgroundColor = "blue"; element.href = archived_snapshots.closest.url; }); }); } });