|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 自动无缝翻页 |
3 | | -// @version 2.0.5 |
| 3 | +// @version 2.0.6 |
4 | 4 | // @author X.I.U |
5 | | -// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、贴吧、豆瓣、微博、NGA(玩家社区)、V2EX、看雪论坛、起点小说、煎蛋网、超能网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、小霸王其乐无穷、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、片库、音范丝、BT之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、果核剥壳、六音软件、微当下载、th-sjy 汉化、异次元软件、老殁殁漂遥、异星软件空间、动漫狂、漫画猫、漫画DB、HiComic(嗨漫画)、动漫之家、古风漫画网、砂之船动漫家、PubMed、wikiHow、GreasyFork、CS.RIN.RU、FitGirl(更多的写不下了... |
| 5 | +// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、微信、贴吧、豆瓣、微博、NGA(玩家社区)、V2EX、看雪论坛、起点小说、煎蛋网、超能网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、小霸王其乐无穷、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、片库、音范丝、BT之家、爱恋动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、小众软件、极简插件、果核剥壳、六音软件、微当下载、th-sjy 汉化、异次元软件、老殁殁漂遥、异星软件空间、动漫狂、漫画猫、漫画DB、HiComic(嗨漫画)、动漫之家、古风漫画网、砂之船动漫家、PubMed、wikiHow、GreasyFork、CS.RIN.RU、FitGirl(更多的写不下了... |
6 | 6 | // @match *://*/* |
7 | 7 | // @connect www.gamersky.com |
8 | 8 | // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png |
|
111 | 111 | nextTextOf: '下一页', |
112 | 112 | scrollDelta: 1500 |
113 | 113 | } |
114 | | - }, // Discuz! - 各版块帖子列表(自带无缝加载下一页按钮的) |
| 114 | + }, // Discuz! - 各版块帖子列表(自带无缝加载下一页按钮的) |
115 | 115 | discuz_guide: { |
116 | 116 | SiteTypeID: 0, |
117 | 117 | pager: { |
|
122 | 122 | replaceE: 'css;.pg, .pages', |
123 | 123 | scrollDelta: 1000 |
124 | 124 | } |
125 | | - }, // Discuz! - 导读页 及 各版块帖子列表(不带无缝加载下一页按钮的) |
| 125 | + }, // Discuz! - 导读页 及 各版块帖子列表(不带无缝加载下一页按钮的) |
126 | 126 | discuz_waterfall: { |
127 | 127 | SiteTypeID: 0, |
128 | 128 | pager: { |
|
133 | 133 | replaceE: 'css;.pg, .pages', |
134 | 134 | scrollDelta: 1000 |
135 | 135 | } |
136 | | - }, // Discuz! - 图片模式的各版块帖子列表(不带无缝加载下一页按钮的) |
| 136 | + }, // Discuz! - 图片模式的各版块帖子列表(不带无缝加载下一页按钮的) |
137 | 137 | discuz_thread: { |
138 | 138 | SiteTypeID: 0, |
139 | 139 | pager: { |
|
144 | 144 | replaceE: 'css;.pg, .pages', |
145 | 145 | scrollDelta: 1000 |
146 | 146 | } |
147 | | - }, // Discuz! - 帖子内 |
| 147 | + }, // Discuz! - 帖子内 |
148 | 148 | discuz_search: { |
149 | 149 | SiteTypeID: 0, |
150 | 150 | pager: { |
|
155 | 155 | replaceE: 'css;.pg, .pages', |
156 | 156 | scrollDelta: 1000 |
157 | 157 | } |
158 | | - }, // Discuz! - 搜索页 |
| 158 | + }, // Discuz! - 搜索页 |
159 | 159 | discuz_youspace: { |
160 | 160 | SiteTypeID: 0, |
161 | 161 | pager: { |
|
166 | 166 | replaceE: 'css;.pg, .pages', |
167 | 167 | scrollDelta: 1000 |
168 | 168 | } |
169 | | - }, // Discuz! - 回复页、主题页(别人的) |
| 169 | + }, // Discuz! - 回复页、主题页(别人的) |
170 | 170 | discuz_collection: { |
171 | 171 | SiteTypeID: 0, |
172 | 172 | pager: { |
|
177 | 177 | replaceE: 'css;.pg, .pages', |
178 | 178 | scrollDelta: 1000 |
179 | 179 | } |
180 | | - }, // Discuz! - 淘帖页 |
| 180 | + }, // Discuz! - 淘帖页 |
181 | 181 | flarum: { |
182 | 182 | SiteTypeID: 0, |
183 | 183 | pager: { |
|
199 | 199 | function: { |
200 | 200 | before: dux_functionBefore |
201 | 201 | } |
202 | | - }, // 一种 WordPress 主题 |
| 202 | + }, // 一种 WordPress 主题 |
203 | 203 | baidu: { |
204 | 204 | SiteTypeID: 0, |
205 | 205 | host: 'www.baidu.com', |
|
212 | 212 | replaceE: 'css;#page', |
213 | 213 | scrollDelta: 1200 |
214 | 214 | } |
215 | | - }, // 百度搜素 |
| 215 | + }, // 百度搜素 |
216 | 216 | google: { |
217 | 217 | SiteTypeID: 0, |
218 | 218 | host: 'www.google.com', |
|
226 | 226 | scriptType: 1, |
227 | 227 | scrollDelta: 3000 |
228 | 228 | } |
229 | | - }, // 谷歌搜索 |
| 229 | + }, // 谷歌搜索 |
230 | 230 | bing: { |
231 | 231 | SiteTypeID: 0, |
232 | 232 | host: ['www.bing.com','cn.bing.com'], |
|
239 | 239 | replaceE: 'css;#b_results > .b_pag', |
240 | 240 | scrollDelta: 1500 |
241 | 241 | } |
242 | | - }, // 必应搜索 |
| 242 | + }, // 必应搜索 |
| 243 | + sogou: { |
| 244 | + SiteTypeID: 0, |
| 245 | + host: 'www.sogou.com', |
| 246 | + functionStart: function() {if (location.pathname != '/') {curSite = DBSite.sogou;}}, |
| 247 | + pager: { |
| 248 | + type: 1, |
| 249 | + nextLink: 'css;#sogou_next', |
| 250 | + pageElement: 'css;.results > *', |
| 251 | + insertPosition: ['css;.results', 3], |
| 252 | + replaceE: 'css;#pagebar_container', |
| 253 | + scriptType: 4, |
| 254 | + scrollDelta: 1200 |
| 255 | + } |
| 256 | + }, // 搜狗搜索 |
| 257 | + sogou_weixin: { |
| 258 | + SiteTypeID: 0, |
| 259 | + host: 'weixin.sogou.com', |
| 260 | + functionStart: function() {if (location.pathname === '/') { |
| 261 | + curSite = DBSite.sogou_weixin; |
| 262 | + } else if (location.pathname === '/weixin') { |
| 263 | + curSite = DBSite.sogou_weixin_search; |
| 264 | + }}, |
| 265 | + pager: { |
| 266 | + type: 2, |
| 267 | + nextLink: '#look-more', |
| 268 | + intervals: 1000, |
| 269 | + scrollDelta: 1000 |
| 270 | + } |
| 271 | + }, // 搜狗微信 - 首页 |
| 272 | + sogou_weixin_search: { |
| 273 | + SiteTypeID: 0, |
| 274 | + pager: { |
| 275 | + type: 1, |
| 276 | + nextLink: 'css;#sogou_next', |
| 277 | + pageElement: 'css;.news-box > ul[class*="news-list"] > li', |
| 278 | + insertPosition: ['css;.news-box > ul[class*="news-list"]', 3], |
| 279 | + replaceE: 'css;#pagebar_container', |
| 280 | + scrollDelta: 1000 |
| 281 | + } |
| 282 | + }, //搜狗微信 - 搜索 |
| 283 | + magi: { |
| 284 | + SiteTypeID: 0, |
| 285 | + host: 'magi.com', |
| 286 | + functionStart: function() {if (location.pathname === '/search') {curSite = DBSite.magi;}}, |
| 287 | + pager: { |
| 288 | + type: 2, |
| 289 | + nextLink: '.card[data-type="next"]', |
| 290 | + nextText: '加载更多', |
| 291 | + scrollDelta: 1500 |
| 292 | + } |
| 293 | + }, // Magi 搜索 |
243 | 294 | baidu_tieba: { |
244 | 295 | SiteTypeID: 0, |
245 | 296 | host: 'tieba.baidu.com', |
|
1922 | 1973 | // [Discuz! 论坛] 图片模式列表样式预处理 |
1923 | 1974 | function waterfallStyle() { |
1924 | 1975 | let width = document.querySelector('#waterfall > li:first-child').style.width; |
1925 | | - document.lastChild.appendChild(document.createElement('style')).textContent = `#waterfall {height: auto !important; width: 100% !important;} |
1926 | | - #waterfall > li {width: ${width} !important; float: left !important; position: inherit !important; left: auto !important; top: auto !important;}`; |
| 1976 | + document.lastChild.appendChild(document.createElement('style')).textContent = `#waterfall {height: auto !important; width: 100% !important;} #waterfall > li {width: ${width} !important; float: left !important; position: inherit !important; left: auto !important; top: auto !important;}`; |
1927 | 1977 | } |
1928 | 1978 |
|
1929 | 1979 |
|
|
2823 | 2873 |
|
2824 | 2874 | if (support) { |
2825 | 2875 | console.info('[自动无缝翻页] - 其他网站(独立规则)'); return 1; |
2826 | | - } else if (document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]') || document.getElementById('ft') && document.getElementById('ft').textContent.indexOf('Discuz!') > -1) { |
| 2876 | + } else if (document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]') || document.querySelector('a[href*="www.discuz.net"]') && document.querySelector('a[href*="www.discuz.net"]').textContent.indexOf('Discuz!') > -1) { |
2827 | 2877 | console.info('[自动无缝翻页] - Discuz! 论坛'); return 2; |
2828 | 2878 | } else if (document.getElementById('flarum-loading')) { |
2829 | 2879 | console.info('[自动无缝翻页] - Flarum 论坛'); return 3; |
|
0 commit comments