您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
當滾動到頁面底部時,自動點擊展開之前留言按鈕。
// ==UserScript== // @name 動畫瘋 自動展開「留言板」之前留言 // @version 1.2 // @description 當滾動到頁面底部時,自動點擊展開之前留言按鈕。 // @author movwei // @license MIT // @match https://ani.gamer.com.tw/animeVideo.php?sn=* // @namespace https://gf.qytechs.cn/users/1041101 // ==/UserScript== (function() { 'use strict'; let expanding = false; function simulateClick(element) { if (element) { var event = new Event('click', { bubbles: true, cancelable: true }); element.dispatchEvent(event); } } function isPageBottom() { return (window.innerHeight + window.scrollY) >= document.body.offsetHeight - 2; } function checkAndClick() { if (isPageBottom() && !expanding) { var expandButton = document.querySelector('.c-msg-item.c-more-msg[data-evt-morecomment]'); if (expandButton) { expanding = true; simulateClick(expandButton); console.log('已點擊展開按鈕'); // 使用 MutationObserver 監控內容變化 var observer = new MutationObserver(() => { expanding = false; }); observer.observe(document.body, { childList: true, subtree: true }); } else { console.log('未找到展開按鈕'); } } } window.addEventListener('scroll', checkAndClick); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址