Lanzn Auto Click Download Button

蓝奏云自动点击下载按钮

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Lanzn Auto Click Download Button
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  蓝奏云自动点击下载按钮
// @author       Your Name
// @match        http*://*.lanzn.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 等待页面加载完成
    window.addEventListener('load', function() {
        // 查找第一个按钮元素
        const firstButton = document.querySelector('.passwddiv-btn'); // 根据实际情况调整选择器

        // 如果找到了第一个按钮,就点击它
        if (firstButton) {
            firstButton.click();

            // 等待页面加载
            setTimeout(() => {
                // 查找第二个下载链接
                const downloadLink = document.querySelector('a[href*="down-load.lanrar.com"]'); // 根据实际情况调整选择器

                // 如果找到了下载链接,就点击它
                if (downloadLink) {
                    downloadLink.click();
                }
            }, 1000); // 等待 3 秒后点击下载链接,时间可以根据需要调整
        }
    });
})();