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

Function qianDao

52pojie-Enhanced.user.js:188–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187 // 自动签到(后台)
188 function qianDao() {
189 if (!menu_value('menu_autoClockIn')) return
190 if (location.pathname === '/home.php' && location.search.indexOf('mod=task') > -1) {return;}
191 let qiandao = document.querySelector('#um a[href^="home.php?mod=task&do=apply&id=2"]');
192 if (qiandao) {
193 let iframe = document.createElement('iframe'); // XHR 方式无法签到,改用 iframe 框架打开签到网页
194 document.lastElementChild.appendChild(iframe);
195 iframe.style = 'display: none;';
196 iframe.src = qiandao.href;
197 qiandao.querySelector('.qq_bind').src = 'https://www.52pojie.cn/static/image/common/wbs.png'; // 修改 [打卡签到] 图标为 [签到完毕] 图标
198 qiandao.href = 'javascript:void(0);'
199 }
200 }
201
202
203 //屏蔽悬赏贴(导读-最新发表)

Callers 1

Calls 1

menu_valueFunction · 0.70

Tested by

no test coverage detected