您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2022/3/24 16:25:11
// ==UserScript== // @name 增加周次切换按钮 - seewo.com // @namespace Violentmonkey Scripts // @match https://care.seewo.com/app/ // @grant none // @version 1.0 // @author tony // @description 2022/3/24 16:25:11 // @license MIT // ==/UserScript== (function(){ var tim; function preWeek(){ alert("Hello,preWeek"); } function nextWeek(){ } function AddBtn(){ pChoose = document.getElementsByClassName("ant-select-selection-selected-value"); pDiv = document.getElementsByClassName("ant-row date-picker-row"); ispreDiv =document.getElementById("newPreBtn"); if(ispreDiv!=null){ if(pChoose[0].innerHTML!="自定义"){ pDiv[0].removeChild(ispreDiv); } return; } preDiv = document.createElement("div"); preDiv.setAttribute("stype","margin-left: 10px"); preDiv.id = "newPreBtn"; preDiv.className ="ant-col-2"; preBtn = document.createElement("button"); preBtn.className ="ant-btn select-btn"; preBtn.textContent ="上周"; preBtn.addEventListener("click",preWeek); nextBtn = document.createElement("button"); nextBtn.className ="ant-btn select-btn"; nextBtn.textContent ="下周"; nextBtn.addEventListener("click",nextWeek); preDiv.appendChild(preBtn); preDiv.appendChild(nextBtn); if(pDiv.length>0){ if(pChoose[0].innerHTML=="自定义") { pDiv[0].appendChild(preDiv); } } } tim = setInterval(AddBtn,3000); })();