xvidoe download

try to take over the world!

As of 2021-01-11. See the latest version.

// ==UserScript==
// @name         xvidoe download
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  try to take over the world!
// @author       You
// @match        https://www.xvideos.com/*
// @grant        none
// ==/UserScript==

window.addEventListener('load', function(){
var cum

     function gongneng(p,M) {
        var x,r,g,k,s,vid,Z;
        x = document.getElementsByTagName("div");
        r = x[14].textContent;
        r.match(/.mp4/).input;
        g = r.match(/.mp4/).input;
        k = g.split("{");
        try{
            s = k[42].match(/mp4/).input;
        }
        catch(e) {
            s = k[41].match(/mp4/).input;
        }
        vid = s.split(/VideoUrlHigh/)[1].split(/html5/)[0];
        Z = vid.replace("');", "");
        M = Z.replace("('", "");
       cum=M

     }


        function addbtn(p,M){
        let pretag = document.getElementsByTagName("div");
        p = pretag[14];
        let btn = document.createElement("button");
        btn.innerHTML = "DOWNLOAD";
        btn.onclick = ()=>{
            window.open(cum);
        }

        p.insertBefore(btn, p.childNodes[0]);

    }

gongneng();

    addbtn();


});