Voe video redirector

Redirect to link for Voe.sx videos

当前为 2021-06-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Voe video redirector
// @namespace    https://tribbe.de
// @version      1.1.9
// @description  Redirect to link for Voe.sx videos
// @author       Tribbe
// @include      *://*voe*
// @require      https://greasyfork.org/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// ==/UserScript==

function decrypt(p01){ p01 = p01.join(''); p01 = p01.split('').reverse().join(''); return atob(p01); }

window.addEventListener("load", function() {
    var mp4finder = null;
    var video = null;

    var content = document.body.textContent;

    mp4finder = content.match(/(https?.*?\.mp4)/);
    if (mp4finder != null) video = mp4finder[0];

    if(video == null) {
        mp4finder = content.match(/sources\[\"mp4\"\] = .....\(\[(.*?)]\);/);
        if (mp4finder != null && mp4finder.length == 2) {
            var mp4array = mp4finder[1].replaceAll("'", "").split(",");
            video = decrypt(mp4array);
        }
    }

    if(video != null) window.location.href = video;
});


// Stop Autoplay
waitForKeyElements ("video[name*='media']", function(jNode) { jNode[0].autoplay = false; });