|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 3DM论坛增强 |
3 | | -// @version 1.0.6 |
| 3 | +// @version 1.0.7 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 自动回复、自动无缝翻页、清理置顶帖子 |
6 | 6 | // @match *://bbs.3dmgame.com/* |
|
60 | 60 | function menu_switch(menu_status, Name, Tips) { |
61 | 61 | if (menu_status){ |
62 | 62 | GM_setValue(`${Name}`, false); |
63 | | - GM_notification(`已关闭 [${Tips}] 功能\n(刷新网页后生效)`); |
| 63 | + GM_notification({text: `已关闭 [${Tips}] 功能\n(刷新网页后生效)`, timeout: 3500}); |
64 | 64 | }else{ |
65 | 65 | GM_setValue(`${Name}`, true); |
66 | | - GM_notification(`已开启 [${Tips}] 功能\n(刷新网页后生效)`); |
| 66 | + GM_notification({text: `已开启 [${Tips}] 功能\n(刷新网页后生效)`, timeout: 3500}); |
67 | 67 | } |
68 | 68 | registerMenuCommand(); // 重新注册脚本菜单 |
69 | 69 | }; |
|
124 | 124 |
|
125 | 125 | // 用于脚本内部判断当前 URL 类型 |
126 | 126 | let SiteType = { |
127 | | - FORUM: DBSite.forum.SiteTypeID, // 各板块帖子列表 |
| 127 | + FORUM: DBSite.forum.SiteTypeID, // 各板块帖子列表 |
128 | 128 | THREAD: DBSite.thread.SiteTypeID, // 帖子内 |
129 | | - GUIDE: DBSite.guide.SiteTypeID // 导读帖子列表 |
| 129 | + GUIDE: DBSite.guide.SiteTypeID // 导读帖子列表 |
130 | 130 | }; |
131 | 131 |
|
132 | 132 | // 下一页URL |
|
145 | 145 | if (patt_thread.test(location.pathname) || patt_thread_2.test(location.search)){ |
146 | 146 | // 帖子内 |
147 | 147 | if(menu_thread_pageLoading)curSite = DBSite.thread; |
148 | | - if(menu_autoReply)autoReply(); // 如果有隐藏内容,则自动回复 |
149 | | - pageLoading(); // 自动翻页 |
| 148 | + if(menu_autoReply)autoReply(); // 如果有隐藏内容,则自动回复 |
| 149 | + pageLoading(); // 自动翻页 |
150 | 150 | if(menu_scrollToShowhide)setTimeout(`window.scrollTo(0,document.querySelector('.showhide').offsetTop)`, 500); // 滚动至隐藏内容 |
151 | 151 | }else if (patt_forum.test(location.pathname) || patt_forum_2.test(location.search)){ |
152 | 152 | // 各板块帖子列表 |
153 | 153 | curSite = DBSite.forum; |
154 | | - if(menu_cleanTopPost)cleanTopPost(); // 清理置顶帖子 |
155 | | - pageLoading(); // 自动翻页 |
| 154 | + if(menu_cleanTopPost)cleanTopPost(); // 清理置顶帖子 |
| 155 | + pageLoading(); // 自动翻页 |
156 | 156 | }else if (patt_guide.test(location.search)){ |
157 | 157 | // 导读帖子列表 |
158 | 158 | curSite = DBSite.guide; |
159 | | - pageLoading(); // 自动翻页 |
| 159 | + pageLoading(); // 自动翻页 |
160 | 160 | } |
161 | 161 |
|
162 | 162 |
|
|
0 commit comments