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

Function delateReward

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

Source from the content-addressed store, hash-verified

202
203 //屏蔽悬赏贴(导读-最新发表)
204 function delateReward() {
205 if (!menu_value('menu_delateReward')) return
206 if (location.search.indexOf('mod=guide&view=newthread') > -1) {
207 let tbody = document.querySelectorAll('#threadlist tbody[id^="normalthread"]');
208 Array.from(tbody).forEach(function (_this) {
209 if (_this.querySelector('img[alt="悬赏"]')) {
210 _this.remove();
211 }
212 })
213 }
214
215 if (document.body.scrollHeight < window.innerHeight) {
216 // 如果屏蔽悬赏贴后,剩余帖子列表太少会没有滚动条,无法滚动页面触发自动翻页事件,需要手动触发
217 ShowPager.loadMorePage();
218 }
219 }
220
221
222 // 隐藏帖子内的 [下一页] 按钮

Callers 2

showPagerFunction · 0.85

Calls 1

menu_valueFunction · 0.70

Tested by

no test coverage detected