Xrares priv video view

see xrares priv videos

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name            Xrares priv video view
// @description     see xrares priv videos
// @namespace       sebaalosrom
// @version         1.0.0
// @author          Sebastian Osses
// @license         MIT
// @match           *://*.xrares.com/*
// @homepageURL     https://sleazyfork.org/en/users/1606647-shawn-parker
// ==/UserScript==

(function () {
    'use strict';

    function procesarVideo() {
        const container = document.querySelector('.video-container');
        if (!container) return;

        const privMsg = container.querySelector('.privMSG');
        if (!privMsg) return;

        let vkey = "";
        if (typeof window.evideo_vkey !== 'undefined') {
            vkey = window.evideo_vkey;
        } else if (typeof evideo_vkey !== 'undefined') {
            vkey = evideo_vkey;
        }

        if (!vkey) {
            console.warn('[Userscript] Se encontró .privMSG pero no existe la variable evideo_vkey.');
            return;
        }

        const videoHTML = `
            <video id="vjsplayer_html5_api" controls autoplay muted style="width:100%;height:100%;" class="vjs-tech" slideimage="https://cdn.xrares.com/media/videos/vjsslides/69/69049_progressthumb.jpg" preload="auto">
                <source src="https://www.xrares.com/vsrc/h264/${vkey}/HD" type="video/mp4" label="HD" res="720">
            </video>
        `;

        container.querySelector(".col-xs-12").innerHTML = videoHTML;
    }

    procesarVideo();

    const observer = new MutationObserver((mutations, obs) => {
        const container = document.querySelector('.video-container');
        if (container && container.querySelector('.privMSG')) {
            procesarVideo();
        }
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();