您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Следит за лимитом участий с отстуком в тг-бота
// ==UserScript== // @name Лолз гивэвэй монитор // @version 1.0 // @description Следит за лимитом участий с отстуком в тг-бота // @author MisterLis // @match https://lolz.live/forums/contests/* // @grant GM_xmlhttpRequest // @namespace https://greasyfork.org/users/1508462 // ==/UserScript== (function () { 'use strict'; const BOT_TOKEN = ''; const CHAT_ID = ''; const LEFT_MAX = 5; const RELOAD_MS = 60 * 1000; const sendTg = (text) => { GM_xmlhttpRequest({ method: 'POST', url: `https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`, headers: { 'Content-Type': 'application/json' }, data: JSON.stringify({ chat_id: CHAT_ID, text }) }); }; const checkLimit = () => { const node = document.querySelector('.counterText'); if (!node) return; const [used, total] = node.textContent.trim().split('/').map(Number); const left = total - used; console.log(`Giveaway: ${used}/${total}, left=${left}`); if (left <= LEFT_MAX && !window.__tgSent) { sendTg(`⚠️ Осталось ${left} из ${total} попыток в розыгрышах lolz.live!\nНе забудьте создать розыгрыш https://lolz.live/forums/contests/create-thread`); window.__tgSent = true; } }; checkLimit(); setTimeout(() => location.reload(), RELOAD_MS); })();