您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Keeps chat active to most recent messages, will not allow it to scroll up and see previous messages
当前为
// ==UserScript== // @name Never Let Chat Pause (Memory Leak Fix) // @namespace https://gf.qytechs.cn/en/users/1200587-trilla-g // @version 3.0 // @description Keeps chat active to most recent messages, will not allow it to scroll up and see previous messages // @author Trilla_G // @match *://*.kick.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; let isPaused = false; // Define the selector for the button with the exact class name const buttonSelector = 'div.flex.cursor-pointer.items-center.gap-1.rounded.bg-secondary-lighter\\/80.py-1\\.5.pl-2.pr-3.font-semibold.hover\\:bg-secondary-lightest\\/80'; // Function to check for the button and click it function checkForButtonAndClick() { if (isPaused) return; const button = document.querySelector(buttonSelector); if (button) { button.click(); console.log('Button clicked!'); } } // Create an IntersectionObserver to monitor the visibility of the button const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (!isPaused && entry.isIntersecting) { checkForButtonAndClick(); } }); }, { root: null, // Use the viewport as the root threshold: 0.1 // Trigger when 10% of the button is visible }); // Initial check to observe the button function observeButton() { const button = document.querySelector(buttonSelector); if (button) { observer.observe(button); console.log('Observing button element.'); } else { console.log('Button element not found.'); } } // Start observing the button if it is present observeButton(); // Add an event listener for the specific keystroke to pause the function document.addEventListener('keydown', (event) => { if (event.code === 'Delete') { isPaused = true; console.log('Paused for 15 seconds'); setTimeout(() => { isPaused = false; console.log('Resumed'); }, 15000); // 15000 milliseconds = 15 seconds } }); // Recheck and start observing button periodically setInterval(observeButton, 1000); // Check every second })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址