XNXX Player Enlarger and Scroller

Enlarge player and scroll to it

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

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