|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 吾爱破解论坛增强 - 自动签到、翻页 |
3 | | -// @version 1.3.0 |
| 3 | +// @version 1.3.1 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 自动签到、自动无缝翻页、屏蔽导读悬赏贴(最新发表页) |
6 | 6 | // @match *://www.52pojie.cn/* |
|
90 | 90 | SiteTypeID: 2, |
91 | 91 | pager: { |
92 | 92 | type: 1, |
93 | | - nextLink: '//div[@id="pgt"]//a[contains(text(),"下一页")][@href]', |
| 93 | + nextLink: '//a[@class="nxt"][@href]', |
94 | 94 | pageElement: 'css;div#postlist > div[id^="post_"]', |
95 | 95 | HT_insert: ['css;div#postlist', 2], |
96 | 96 | replaceE: 'css;div.pg', |
97 | 97 | scrollDelta: 766 |
98 | 98 | } |
99 | 99 | }, |
100 | | - guide: { |
| 100 | + search: { |
101 | 101 | SiteTypeID: 3, |
102 | 102 | pager: { |
103 | 103 | type: 1, |
104 | | - nextLink: '//div[@id="pgt"]//a[contains(text(),"下一页")][@href]', |
105 | | - pageElement: 'css;div#threadlist div.bm_c table > tbody[id^="normalthread_"]', |
106 | | - HT_insert: ['css;div#threadlist div.bm_c table', 2], |
| 104 | + nextLink: '//a[@class="nxt"][@href]', |
| 105 | + pageElement: 'css;div#threadlist > ul', |
| 106 | + HT_insert: ['css;div#threadlist', 2], |
107 | 107 | replaceE: 'css;div.pg', |
108 | 108 | scrollDelta: 766 |
109 | 109 | } |
110 | 110 | }, |
111 | | - collection: { |
| 111 | + guide: { |
112 | 112 | SiteTypeID: 4, |
113 | 113 | pager: { |
114 | 114 | type: 1, |
115 | | - nextLink: '//div[@class="pg"]//a[contains(text(),"下一页")][@href]', |
116 | | - pageElement: 'css;div#ct div.bm_c table > tbody', |
117 | | - HT_insert: ['css;div#ct div.bm_c table', 2], |
| 115 | + nextLink: '//a[@class="nxt"][@href]', |
| 116 | + pageElement: 'css;div#threadlist div.bm_c table > tbody', |
| 117 | + HT_insert: ['css;div#threadlist div.bm_c table', 2], |
118 | 118 | replaceE: 'css;div.pg', |
119 | | - scrollDelta: 899 |
| 119 | + scrollDelta: 766 |
120 | 120 | } |
121 | 121 | }, |
122 | | - favorite: { |
| 122 | + youspace: { |
123 | 123 | SiteTypeID: 5, |
124 | 124 | pager: { |
125 | 125 | type: 1, |
126 | 126 | nextLink: '//a[@class="nxt"][@href]', |
127 | | - pageElement: 'css;ul#favorite_ul > li', |
128 | | - HT_insert: ['css;ul#favorite_ul', 2], |
| 127 | + pageElement: 'css;tbody > tr:not(.th)', |
| 128 | + HT_insert: ['css;tbody', 2], |
129 | 129 | replaceE: 'css;div.pg', |
130 | | - scrollDelta: 899 |
| 130 | + scrollDelta: 1000 |
131 | 131 | } |
132 | 132 | }, |
133 | | - search: { |
| 133 | + collection: { |
134 | 134 | SiteTypeID: 6, |
135 | 135 | pager: { |
136 | 136 | type: 1, |
137 | 137 | nextLink: '//a[@class="nxt"][@href]', |
138 | | - pageElement: 'css;div#threadlist > ul', |
139 | | - HT_insert: ['css;div#threadlist', 2], |
| 138 | + pageElement: 'css;div#ct div.bm_c table > tbody', |
| 139 | + HT_insert: ['css;div#ct div.bm_c table', 2], |
140 | 140 | replaceE: 'css;div.pg', |
141 | | - scrollDelta: 766 |
| 141 | + scrollDelta: 899 |
| 142 | + } |
| 143 | + }, |
| 144 | + favorite: { |
| 145 | + SiteTypeID: 7, |
| 146 | + pager: { |
| 147 | + type: 1, |
| 148 | + nextLink: '//a[@class="nxt"][@href]', |
| 149 | + pageElement: 'css;ul#favorite_ul > li', |
| 150 | + HT_insert: ['css;ul#favorite_ul', 2], |
| 151 | + replaceE: 'css;div.pg', |
| 152 | + scrollDelta: 899 |
142 | 153 | } |
143 | 154 | } |
144 | 155 | }; |
145 | 156 |
|
146 | 157 | // URL 匹配正则表达式 |
147 | 158 | let patt_thread = /\/thread-\d+-\d+\-\d+.html/, |
148 | | - patt_forum = /\/forum-\d+-\d+\.html/, |
149 | | - patt_guide = /mod\=guide\&view\=(hot|digest|new|newthread|my|tech|help)/ |
| 159 | + patt_forum = /\/forum-\d+-\d+\.html/ |
150 | 160 |
|
151 | 161 | // URL 判断 |
152 | 162 | if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) { |
|
156 | 166 | } |
157 | 167 | } else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { |
158 | 168 | curSite = DBSite.forum; // 各板块帖子列表 |
159 | | - } else if (patt_guide.test(location.search)) { |
| 169 | + } else if (location.search.indexOf('mod=guide') > -1) { |
160 | 170 | curSite = DBSite.guide; // 导读帖子列表 |
161 | 171 | delateReward(); // 屏蔽导读悬赏贴(最新发表) |
162 | 172 | } else if (location.search.indexOf('mod=collection') > -1) { |
|
165 | 175 | curSite = DBSite.favorite; // 收藏列表 |
166 | 176 | } else if (location.pathname === '/search.php') { |
167 | 177 | curSite = DBSite.search; // 搜索结果列表 |
| 178 | + } else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复 |
| 179 | + curSite = DBSite.youspace; |
168 | 180 | } |
169 | 181 | curSite.pageUrl = ""; // 下一页URL |
170 | 182 |
|
|
0 commit comments