|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 智友邦论坛增强 |
3 | | -// @version 1.0.7 |
| 3 | +// @version 1.0.8 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 自动签到、自动回复、自动无缝翻页、清理置顶帖子、清理帖子标题〖XXX〗【XXX】文字 |
6 | 6 | // @icon http://bbs.zhiyoo.net/favicon.ico |
7 | 7 | // @match *://bbs.zhiyoo.net/* |
8 | 8 | // @grant GM_xmlhttpRequest |
| 9 | +// @grant GM_registerMenuCommand |
| 10 | +// @grant GM_openInTab |
| 11 | +// @grant GM_getValue |
| 12 | +// @grant GM_setValue |
| 13 | +// @grant GM_notification |
9 | 14 | // @license GPL-3.0 License |
10 | 15 | // @run-at document-end |
11 | 16 | // @namespace https://greasyfork.org/scripts/412362 |
|
15 | 20 | // 签到后跳转的URL |
16 | 21 | var qiandao_Redirect_URL = `http://bbs.zhiyoo.net/forum.php?mod=forumdisplay&fid=42&filter=author&orderby=dateline`; |
17 | 22 |
|
18 | | - // 是否开启「清理帖子列表中帖子标题开头的〖XXX〗【XXX】文字」功能,标题中的 APP 名称完全对齐,看起来更舒服!true 为开启,false 为关闭,默认开启。 |
19 | | - var cleanText = true; |
| 23 | + // 开关「清理帖子列表中帖子标题开头的〖XXX〗【XXX】文字」功能,标题中的 APP 名称完全对齐,看起来更舒服!true 为开启,false 为关闭,默认开启。 |
| 24 | + var cleanText = GM_getValue('xiu2_cleanText'); |
| 25 | + if (cleanText == null){ |
| 26 | + cleanText = true; |
| 27 | + GM_setValue('xiu2_cleanText', true); |
| 28 | + } |
| 29 | + // 注册脚本菜单 |
| 30 | + GM_registerMenuCommand('开关 [清理帖子标题开头〖〗【】文字] 功能', function () { |
| 31 | + if (cleanText){ |
| 32 | + cleanText = false; |
| 33 | + GM_notification(`已关闭 [清理帖子标题开头〖〗【】文字] 功能(刷新网页后生效)`); |
| 34 | + }else{ |
| 35 | + cleanText = true; |
| 36 | + GM_notification(`已开启 [清理帖子标题开头〖〗【】文字] 功能(刷新网页后生效)`); |
| 37 | + } |
| 38 | + GM_setValue('xiu2_cleanText', cleanText); |
| 39 | + }); |
| 40 | + GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});}); |
| 41 | + |
20 | 42 | // 帖子数量,避免重复清理帖子列表中帖子标题开头的〖XXX〗【XXX】文字,用于提高效率 |
21 | 43 | var postNum = 0; |
22 | 44 |
|
|
140 | 162 | if (document.getElementsByClassName("showhide").length > 0){ |
141 | 163 | setTimeout(`window.scrollTo(0,99999999)`, 1000); |
142 | 164 | //setTimeout(`location.hash='#footer'`, 1000); |
| 165 | + console.log(`${$(".showhide").scrollTop()}`); |
143 | 166 | } |
144 | 167 | } |
145 | 168 | } |
|
0 commit comments