theYNC.com Underground bypass

Watch theYNC Underground videos without needing an account

Stan na 11-12-2024. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        theYNC.com Underground bypass
// @description Watch theYNC Underground videos without needing an account
// @namespace   Violentmonkey Scripts
// @match       https://theync.com/*
// @match       https://theync.net/*
// @match       https://theync.org/*
// @grant       none
// @version     1.5
// @license MIT
// @author      -
// ==/UserScript==
function getTheYNCVideoURL(url) {
    for (const [, group_url] of url.matchAll(
        /https:\/\/theync.com\/media\/thumbs\/(.*?)\.[a-zA-Z0-9_.-]*\//gm
    )) {
        return `https://media.theync.com/videos/${group_url}.mp4`;
    }
}
function waitForElm(selector) {
    return new Promise((resolve) => {
        if (document.querySelector(selector)) {
            return resolve(document.querySelector(selector));
        }

        const observer = new MutationObserver((mutations) => {
            if (document.querySelector(selector)) {
                observer.disconnect();
                resolve(document.querySelector(selector));
            }
        });

        // 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,
        });
    });
}

waitForElm(".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;
        location.href = videoURL;
        return;
    }
    for (const element of contentBlock.querySelectorAll(
        ".inner-block > a:has(> .item-info > .border-gold)"
    )) {
        const thumbnailURL = element.querySelector(".image > img").src;
        if (!thumbnailURL) continue;
        const videoURL = getTheYNCVideoURL(thumbnailURL);
        if (!videoURL) continue;
        element.href = videoURL;
    }
});