Greasy Fork

Greasy Fork is available in English.

游侠 下载免跳转

跳转来跳转去的,有意思吗?

当前为 2021-01-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         游侠 下载免跳转
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  跳转来跳转去的,有意思吗?
// @author       cw2012
// @match        https://down.ali213.net/pcgame/*
// @icon         https://down.ali213.net/favicon.ico
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    if(typeof(downID)=='undefined'){
        let timer = setInterval(()=>{
            if(downId){
                clearInterval(timer);
                updateUI();
            }
        },1000);
    }else{
        updateUI();
    }
    function updateUI(){
        let url = `http://www.soft5566.com/down/${downID}-1.html`;
        let btn = document.querySelector('a#xz');
        let jump= ()=>{window.open(url);};
        btn.onclick = null;
        btn.addEventListener('click',jump);
        document.getElementById('down_load').style.display = 'none';
        btn = document.querySelectorAll('.detail_body_left_nav ul>li')[5];
        btn.onclick = null;
        btn.addEventListener('click',jump);
    }
})();