您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
小红书助手:自动取消视频静音
// ==UserScript== // @name Xiaohongshu Assistant // @namespace https://www.xiaohongshu.com/ // @version 0.1.0 // @description 小红书助手:自动取消视频静音 // @author muggledy // @match https://www.xiaohongshu.com/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @license MIT // @run-at document-start // ==/UserScript== (function() { 'use strict'; var video_obj = null; var playButton = null; var muteButton = null; // 定义定时器 const checkMuteButton = setInterval(() => { // 尝试获取 muteButton 元素 //video_obj = document.getElementsByTagName('video')[0]; playButton = document.querySelector('.xgplayer-icon-play'); muteButton = document.querySelector('.xgplayer-icon-muted'); // 如果 muteButton 存在,则停止定时器并继续后续操作 if (/*video_obj && */muteButton && playButton) { //console.log('Video obj found:', video_obj); console.log('Play button found:', playButton); console.log('Mute button found:', muteButton); clearInterval(checkMuteButton); // 停止定时器 setTimeout(() => { if (playButton) { console.log('click play button'); playButton.click(); setTimeout(() => { if (muteButton) { console.log('click mute button'); muteButton.click(); } }, 1000); } }, 3000); } }, 100); // 每 100 毫秒检查一次,直到元素被找到 // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址