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

Function showHide

Zhiyoo-Enhanced.user.js:235–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

233
234 // 定位到隐藏内容区域
235 function showHide(){
236 if (loginStatus){
237 // 如果已显示隐藏内容,则定位到隐藏内容区域
238 // 如果没有发现已显示隐藏内容,就不定位了
239 if (document.getElementsByClassName("showhide").length > 0){
240 // 如果使用了我的 [智友邦美化] 脚本,则定位至底部,反之定位至隐藏内容区域
241 if (document.getElementById("fastpostmessage").offsetParent == null){
242 setTimeout(function(){window.scrollTo(0,99999999)}, 1000);
243 }else{
244 setTimeout(function(){window.scrollTo(0,document.querySelector('.showhide').offsetTop)}, 1000);
245 }
246 }
247 }
248 }
249
250
251 // 回到顶部(右键点击空白处)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected