eToro - dark mode for charts

Switches the charts to dark mode

当前为 2024-12-05 提交的版本,查看 最新版本

// ==UserScript==
// @name         eToro - dark mode for charts
// @namespace    http://tampermonkey.net/
// @version      2024-12-05
// @description  Switches the charts to dark mode
// @author       Bartek Igielski
// @match        https://www.etoro.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=etoro.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    const observer = new MutationObserver((mutations, obs) => {
        mutations.forEach((mutation) => {
            mutation.addedNodes.forEach((node) => {
                if (node.nodeType === 1 && node.matches('[data-widget-options]')) {
                    setTimeout(() => {
                        node.contentWindow.tradingViewApi.themes().setStdTheme('dark')
                    }, 5000)
                }
            });
        });
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true,
    });
})();

QingJ © 2025

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