您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Toggle Auto on TradingView by Alt-;
// ==UserScript== // @name TradingView Toggle Auto hotkey // @namespace https://gist.github.com/cleardevice/febc6f4110e1674054b91ecb5760f3c4 // @version 0.1 // @license MIT // @description Toggle Auto on TradingView by Alt-; // @author cleardevice // @match https://www.tradingview.com/chart/* // @grant none // ==/UserScript== var hotKey = ';'; function getElementByXpath(path) { return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; } function doc_keyDown(e) { if (e.altKey && e.key==hotKey) { e.preventDefault(); var elAuto = getElementByXpath('//div[contains(@class,"chart-controls-bar")]//div[contains(@class,"seriesControlWrapper")]/div[last()]/div'); elAuto.click(); } } document.addEventListener('keydown', doc_keyDown, false);