Skip to content

Commit 3f03311

Browse files
committed
新增 [国家自然科学基金] 支持
1 parent 0daae21 commit 3f03311

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

Autopage.user.js

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 3.7.8
3+
// @version 3.7.9
44
// @author X.I.U
55
// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
66
// @match *://*/*
@@ -4456,6 +4456,18 @@ function: {
44564456
scrollD: 2000
44574457
}
44584458
}, // 学术
4459+
nsfc: {
4460+
host: 'output.nsfc.gov.cn',
4461+
functionS: function() {if (indexOF('/conclusionProject/')) curSite = DBSite.nsfc;},
4462+
insStyle: '#pageNoUl {display: none !important;}',
4463+
pager: {
4464+
type: 4,
4465+
nextL: nsfc_nextL,
4466+
insertP: ['css;#pageNoUl', 1],
4467+
insertE: nsfc_insertE,
4468+
scrollD: 1500
4469+
}
4470+
}, // 学术
44594471
google_scholar: {
44604472
pager: {
44614473
type: 1,
@@ -6139,6 +6151,24 @@ function: {
61396151
}
61406152

61416153

6154+
// [国家自然科学基金] 获取下一页地址
6155+
function nsfc_nextL() {
6156+
let id = decodeURIComponent(document.location.href.split('/')[document.location.href.split('/').length - 1]), data
6157+
if (!document.nowPageNum) document.nowPageNum = 2
6158+
data = `id=${id}&index=${document.nowPageNum}`
6159+
if (data === curSite.pageUrl) return
6160+
curSite.pageUrl = data
6161+
getPageElems_(location.origin + '/baseQuery/data/completeProjectReport', 'json', 'POST', data); // 访问下一页 URL 获取
6162+
}
6163+
// [国家自然科学基金] 插入数据
6164+
function nsfc_insertE(pageElems, type) {
6165+
if (!pageElems || pageElems.code != 200) {curSite.SiteTypeID = 0; return}
6166+
if (!pageElems.data.hasnext) {curSite.SiteTypeID = 0} else {document.nowPageNum++}
6167+
pageNum.now = pageNum._now + 1
6168+
getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), `<img style="width: 100%;" data-magnify="gallery" data-src="${pageElems.data.url}" src="${pageElems.data.url}">`);
6169+
}
6170+
6171+
61426172
// --------------------------------------------------------
61436173

61446174

0 commit comments

Comments
 (0)