MCPcopy Create free account
hub / github.com/XIU2/UserScript / autoReply

Function autoReply

3dm-Enhanced.user.js:198–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

196
197 // 自动回复
198 function autoReply(){
199 if (loginStatus){
200 // 存在隐藏内容,则自动回复
201 let autoreply = document.querySelector('.locked a');
202 if (autoreply){
203 writeReply();
204 // 滚动至隐藏内容
205 if(menu_value('menu_scrollToShowhide')){
206 let showhideTime=setInterval(function(){
207 let showhide=document.querySelector('.showhide')
208 if(showhide){
209 clearInterval(showhideTime)
210 window.scrollTo(0,showhide.offsetTop)
211 }}, 100)
212 }else{
213 setTimeout(function(){window.scrollTo(0,0)}, 1000);
214 }
215 }
216 }
217
218 }
219
220
221 // 写入自动回复内容

Callers 1

Calls 2

writeReplyFunction · 0.70
menu_valueFunction · 0.70

Tested by

no test coverage detected