// ==UserScript== // @name 小红书弹卡按钮监测 // @namespace http://xxxxxx.com // @version 1.1 // @icon https://bkimg.cdn.bcebos.com/pic/f3d3572c11dfa9ec8a13fb131a9ae003918fa0ec6bd6 // @description 在指定网页上监测弹卡按钮的存在,并点击它 // @author tunan // @match https://redlive.xiaohongshu.com/live_control // @license MIT // @grant none // @downloadURL https://update.greasyfork.icu/scripts/476129/%E5%B0%8F%E7%BA%A2%E4%B9%A6%E5%BC%B9%E5%8D%A1%E6%8C%89%E9%92%AE%E7%9B%91%E6%B5%8B.user.js // @updateURL https://update.greasyfork.icu/scripts/476129/%E5%B0%8F%E7%BA%A2%E4%B9%A6%E5%BC%B9%E5%8D%A1%E6%8C%89%E9%92%AE%E7%9B%91%E6%B5%8B.meta.js // ==/UserScript== (function() { 'use strict'; // 获取用户保存的检测时间间隔,如果没有保存则使用默认值 let checkInterval = localStorage.getItem('checkInterval'); if (!checkInterval) { checkInterval = 5; // 默认5秒 } // 获取用户保存的目标商品序号,如果没有保存则使用默认值 let targetProductIndex = localStorage.getItem('targetProductIndex'); if (!targetProductIndex) { targetProductIndex = 1; // 默认第一个商品 } // 创建UI const ui = document.createElement('div'); ui.innerHTML = `