Skip to content

Commit e63f3d3

Browse files
committed
新增 [谷歌学术] 支持; 优化 [Github 搜索页] 规则
1 parent 803b897 commit e63f3d3

1 file changed

Lines changed: 23 additions & 7 deletions

File tree

Autopage.user.js

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 2.5.4
3+
// @version 2.5.5
44
// @author X.I.U
55
// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、龙的天空、起点小说、煎蛋网、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了...
66
// @match *://*/*
@@ -224,7 +224,11 @@
224224
google: {
225225
SiteTypeID: 0,
226226
host: /.google./,
227-
functionStart: function() {if (location.pathname === '/search') curSite = DBSite.google;},
227+
functionStart: function() {if (location.pathname === '/search') {
228+
curSite = DBSite.google;
229+
} else if (location.pathname === '/scholar') {
230+
curSite = DBSite.google_scholar;
231+
}},
228232
pager: {
229233
type: 1,
230234
nextLink: 'id("pnnext")[@href]',
@@ -235,6 +239,18 @@
235239
scrollDelta: 3000
236240
}
237241
}, // 谷歌 搜索
242+
google_scholar: {
243+
SiteTypeID: 0,
244+
pager: {
245+
type: 1,
246+
nextLink: '//a[./span[@class="gs_ico gs_ico_nav_next"]]',
247+
pageElement: 'css;#gs_res_ccl_mid > *',
248+
insertPosition: ['css;#gs_res_ccl_mid', 3],
249+
replaceE: 'id("gs_n")',
250+
scriptType: 1,
251+
scrollDelta: 2000
252+
}
253+
}, // 谷歌学术 搜索
238254
bing: {
239255
SiteTypeID: 0,
240256
host: ['www.bing.com','cn.bing.com'],
@@ -1236,7 +1252,7 @@
12361252
function: {
12371253
before: pianku_functionBefore
12381254
}
1239-
}, // 片库
1255+
}, // 片库
12401256
cupfox: {
12411257
SiteTypeID: 0,
12421258
host: 'www.cupfox.com',
@@ -1360,7 +1376,7 @@
13601376
replaceE: 'css;.pagelist',
13611377
scrollDelta: 1000
13621378
}
1363-
}, // 233 动漫
1379+
}, // 233 动漫
13641380
dm233_article: {
13651381
SiteTypeID: 0,
13661382
pager: {
@@ -1371,7 +1387,7 @@
13711387
replaceE: 'css;.pagelist',
13721388
scrollDelta: 1000
13731389
}
1374-
}, // 233 动漫 - 动漫情报/资讯
1390+
}, // 233 动漫 - 动漫情报/资讯
13751391
dm233_rank: {
13761392
SiteTypeID: 0,
13771393
pager: {
@@ -1382,7 +1398,7 @@
13821398
replaceE: 'css;.pagelist',
13831399
scrollDelta: 1000
13841400
}
1385-
}, // 233 动漫 - 排行榜
1401+
}, // 233 动漫 - 排行榜
13861402
agefans: {
13871403
SiteTypeID: 0,
13881404
host: 'www.agefans.cc',
@@ -2465,7 +2481,7 @@
24652481
curSite = DBSite.github_issues;
24662482
} else if (location.pathname.indexOf('/discussions') > -1 && !(/\/discussions\/\d+/.test(location.pathname))) {
24672483
curSite = DBSite.github_discussions;
2468-
} else if (location.pathname === '/search') {
2484+
} else if (location.pathname.indexOf('/search') > -1) {
24692485
if (!location.search) return
24702486
if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) {
24712487
curSite = DBSite.github_search;

0 commit comments

Comments
 (0)