Greasy Fork

Greasy Fork is available in English.

dalipan

显示大力盘的网盘链接,不需扫码

目前为 2020-05-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         dalipan
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  显示大力盘的网盘链接,不需扫码
// @author       You
// @match        https://www.dalipan.com/detail/*
// ==/UserScript==

(function () {
    'use strict';

    function dclose() {
        let w = document.querySelector('.el-dialog__close');
        w.click();
        //b.style.display = "none";
    }

    function geta() {
        console.log('geta');
        var b = document.querySelector('.button');
        b.click();

        setTimeout(() => {
            let d = document.querySelector('.button-wrap');
            let a = document.querySelector('.go-baidu > a:nth-child(1)');
            let a2 = document.querySelector('.go-baidu > a:nth-child(2)');

            if (a) {
                dclose();
                a.style.display = "";
                d.append(a);
                return;
            }


            if (a2) {
                dclose();
                a2.style.display = "";
                d.append(a2);
                return;
            }
        }, 500);


    }

    function ad() {
        let r = document.querySelector('.right-side');
        if (r) {
            r.style.display = "none";
        }
        let f = document.querySelector('.feedback-wrap');
        if (f) {
            f.style.display = "none";
        }
    }

    setTimeout(geta, 500);
    ad();

})();