百度快开

点击左下角按钮帮您快速打开所有链接

目前為 2022-03-04 提交的版本,檢視 最新版本

// ==UserScript==
// @name         百度快开
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  点击左下角按钮帮您快速打开所有链接
// @author       Exisi
// @match        *://www.baidu.com/s*
// @grant        none
// ==/UserScript==
(function () {
    let item = document.getElementsByClassName("result c-container new-pmd");
    if (item != null) {
        createButton(item);
    }
	//打开链接
    function quickOpen(item) {
        for (const i in item) {
            if (item[i].nodeType > 0) {
                item[i].getElementsByTagName("a")[0].click();
            }
        }
    }
	//添加按钮
    function createButton(item) {
        var btn = document.createElement("input");
        btn.setAttribute("type", "button");
        btn.setAttribute("value", "🚀");
        btn.setAttribute("id", "startBtn");
        btn.style.background = "pink";
        btn.style.color = "white";
        btn.style.fontWeight = "500";
        btn.style.width = "50px";
        btn.style.height = "50px";
        btn.style.borderRadius = "100px";
        btn.style.fontSize = "14px";
        btn.style.position = "fixed";
        btn.style.border = "1px pink solid";
        btn.style.bottom = 0;
        btn.style.margin = "25px";
        btn.addEventListener("click", function () {
            for (const i in item) {
                if (item[i].nodeType != null) {
                    item[i].getElementsByTagName("a")[0].click();
                }
            }
        });
        document.getElementById("wrapper").append(btn);
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址