XNXX Player Enlarger and Scroller

Enlarge player and scroll to it

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name             XNXX Player Enlarger and Scroller
// @namespace   [email protected]
// @description   Enlarge player and scroll to it
// @include          *://*xnxx*.*/*
// @version          1.01
// @grant              none
// ==/UserScript==

(function scrollXNXX() {

    // Page modification without CSS
    window.addEventListener("DOMContentLoaded", function() {
        // More tiles in pages that had side ads
        if (document.querySelector(".mozaique:not(.thumbs-4)")) {
            document.querySelector(".mozaique:not(.thumbs-4)").className = "mozaique thumbs-4";
        }
        // Scroll to center video
        if (document.querySelector("body.video-page")) {
            document.querySelector("body.video-page #content").className = "player-enlarged";

            function scrollthere() {
                var vid = document.querySelector("#video-content"),
                    vh = vid.offsetHeight,
                    vd = vid.offsetTop,
                    fh = window.innerHeight,
                    sc = vd-((fh-vh)/2)
                console.log(vd)
                scrollTo(0, sc)
            }// Now inject this function
            var script = document.createElement("script")
            script.setAttribute("type","text/javascript")
            script.innerHTML = scrollthere.toString() + "scrollthere();"
            script.id = ("scrollVid")
            document.head.appendChild(script)
            // Include button in right corner to center video on screen
            var node = document.createElement("div");
            node.setAttribute("style","position: fixed;" +
                                      "bottom: 0;" +
                                      "right: 128px;" +
                                      "cursor: pointer;" +
                                      "border: 1px solid #313131;" +
                                      "border-top-left-radius: 5px;" +
                                      "color: #286fff;" +
                                      "font-weight: 700;" +
                                      "background: #101010;" +
                                      "text-align: center;" +
                                      "font-size: 12px;" +
                                      "padding: 7px 15px;" +
                                      "z-index: 999999;");
            node.setAttribute("onclick", "scrollthere();");
            node.setAttribute("title", "Click here to centre video");
            node.innerHTML = "Centre";
            node.id = "scroll";
            document.body.appendChild(node);
        }
    });
}());