|
1 | 1 | // ==UserScript== |
2 | 2 | // @name V2EX 增强 |
3 | | -// @version 1.0.8 |
| 3 | +// @version 1.0.9 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 自动签到、链接转图片、自动无缝翻页、回到顶部(右键点击两侧空白处)、快速回复(左键双击两侧空白处)、新标签页打开链接、标签页伪装为 Github(摸鱼) |
6 | 6 | // @match *://v2ex.com/* |
|
86 | 86 | pageElement: 'css;.cell.item', |
87 | 87 | HT_insert: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1], |
88 | 88 | replaceE: 'css;#Main > .box > .cell[style]:not(.item) > table', |
89 | | - scrollDelta: 600 |
| 89 | + scrollDelta: 1000 |
90 | 90 | }, |
91 | 91 | function: { |
92 | 92 | after: linksBlank, |
|
131 | 131 | pageElement: 'css;#TopicsNode > div', |
132 | 132 | HT_insert: ['css;#TopicsNode', 3], |
133 | 133 | replaceE: 'css;#Main > .box > .cell[style] > table', |
134 | | - scrollDelta: 700 |
| 134 | + scrollDelta: 1000 |
135 | 135 | }, |
136 | 136 | function: { |
137 | 137 | after: linksBlank, |
|
146 | 146 | pageElement: 'css;.cell[id^="r_"]', |
147 | 147 | HT_insert: ['//div[starts-with(@id, "r_")][last()]/following-sibling::div[@class="cell"][1]', 1], |
148 | 148 | replaceE: 'css;#Main > .box > .cell[style] > table', |
149 | | - scrollDelta: 700 |
| 149 | + scrollDelta: 1000 |
150 | 150 | } |
151 | 151 | }, |
152 | 152 | reply_positive: { // 帖子内容页(正序) |
|
157 | 157 | pageElement: 'css;.cell[id^="r_"]', |
158 | 158 | HT_insert: ['//div[starts-with(@id, "r_")][1]', 1], |
159 | 159 | replaceE: 'css;#Main > .box > .cell[style] > table', |
160 | | - scrollDelta: 700 |
| 160 | + scrollDelta: 1000 |
161 | 161 | } |
162 | 162 | }, |
163 | 163 | balance: { // 账户余额页 |
|
177 | 177 | switch (location.pathname) { |
178 | 178 | case "/": // 首页 |
179 | 179 | linksBlank('#Main a.topic-link:not([target])'); |
| 180 | + addChangesLink(); |
180 | 181 | break; |
181 | 182 | case "/recent": // 最近主题页 |
182 | 183 | curSite = DBSite.recent; |
|
350 | 351 | } |
351 | 352 |
|
352 | 353 |
|
| 354 | + // 添加全站最近更新主题链接 |
| 355 | + function addChangesLink() { |
| 356 | + let links = document.querySelector('#Main .box .inner:last-child');if (!links) return |
| 357 | + links.innerHTML = `<div style="float: left;"><span class="chevron">»</span> <a href="/recent" target="_blank">更多新主题</a></div><div style="text-align: right;"><a href="/changes" target="_blank" style="text-align: right;">全站最近更新主题</a> <span class="chevron">«</span></div>` |
| 358 | + } |
| 359 | + |
| 360 | + |
353 | 361 | // 自动无缝翻页 |
354 | 362 | function pageLoading() { |
355 | 363 | if (curSite.SiteTypeID > 0){ |
|
0 commit comments