Greasy Fork

Greasy Fork is available in English.

雪球港股自动点击实时行情

每秒自动刷新

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         雪球港股自动点击实时行情
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  每秒自动刷新
// @author       daimiaopeng
// @match        https://xueqiu.com/S/*
// @icon         https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://xueqiu.com&size=64
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    function clickRealTimeQuote() {
        const quoteElements = document.querySelectorAll('.stock-refresh');

        for (const el of quoteElements) {
            if (el.textContent.includes("实时行情")) {
                console.log("点击实时行情按钮");
                el.click();
                break;
            }
        }
    }

    window.addEventListener('load', function () {
        // 每秒点击一次
        setInterval(clickRealTimeQuote, 1000);
    });
})();