Created
January 9, 2026 14:56
-
-
Save discountry/370fad2212e19f6433f1ae6bca80042f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 建议先刷新网页停止旧脚本,再运行此脚本 | |
| var autoBilingual = setInterval(function() { | |
| // --- 1. 侦测市场趋势 --- | |
| // 检查是否有向上趋势的图标 (lucide-trending-up) | |
| const marketIsGoingUp = document.querySelector('span svg.lucide-trending-up') !== null; | |
| // --- 2. 制定反向策略 (定义目标关键词) --- | |
| // 逻辑:涨了就买跌/Short,跌了就买涨/Long | |
| let targetKeywords = []; | |
| let actionName = ""; | |
| if (marketIsGoingUp) { | |
| // 市场涨 -> 我们做空 (Short / 下跌) | |
| targetKeywords = ["Place Short", "預測下跌"]; | |
| actionName = "📉 逆势做空"; | |
| } else { | |
| // 市场跌 -> 我们做多 (Long / 上涨) | |
| targetKeywords = ["Place Long", "預測上漲"]; | |
| actionName = "📈 逆势做多"; | |
| } | |
| // --- 3. 遍历寻找并点击 --- | |
| const candidates = document.querySelectorAll('div.w-full.rounded-lg'); // 选取潜在按钮 | |
| let hasClicked = false; | |
| for (let i = 0; i < candidates.length; i++) { | |
| const el = candidates[i]; | |
| const text = el.innerText || ""; | |
| // 核心修改:检查按钮文字是否包含 targetKeywords 数组里的任意一个词 | |
| // 只要包含 "Place Short" 或者 "預測下跌",就视为命中 | |
| const isMatch = targetKeywords.some(keyword => text.includes(keyword)); | |
| if (isMatch) { | |
| el.click(); | |
| hasClicked = true; | |
| // 打印日志,显示当前趋势和点击的内容 | |
| console.log(`[${new Date().toLocaleTimeString()}] 市场:${marketIsGoingUp ? '⬆️' : '⬇️'} -> ${actionName} -> ✅ 已点击: "${text.trim()}"`); | |
| break; | |
| } | |
| } | |
| if (!hasClicked) { | |
| console.log(`[${new Date().toLocaleTimeString()}] ⚠️ 未找到目标按钮 (寻找: ${targetKeywords.join(' 或 ')})`); | |
| } | |
| }, 3000); // 3秒一次 | |
| console.log("🚀 双语反向策略已启动!支持中文/英文界面。"); | |
| console.log(`如需停止,请输入: clearInterval(autoBilingual)`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment