|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 自动无缝翻页 |
3 | | -// @version 4.0.1 |
| 3 | +// @version 4.0.2 |
4 | 4 | // @author X.I.U |
5 | 5 | // @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(以上仅一小部分,更多的写不下了... |
6 | 6 | // @match *://*/* |
@@ -4071,6 +4071,18 @@ function: { |
4071 | 4071 | scrollD: 1500 |
4072 | 4072 | } |
4073 | 4073 | }, // 国家自然科学基金 |
| 4074 | + coolkeyan: { |
| 4075 | + host: 'www.coolkeyan.com', |
| 4076 | + functionS: function() {if (location.hash.indexOf('/project/') > -1) curSite = DBSite.coolkeyan;}, |
| 4077 | + insStyle: '.q-img {height: auto !important;} .q-img__image {max-height: 1000px !important;} .row.q-my-sm.q-gutter-sm {display: none !important;}', |
| 4078 | + pager: { |
| 4079 | + type: 4, |
| 4080 | + nextL: coolkeyan_nextL, |
| 4081 | + insertP: ['//div[contains(@class, "q-img__image")][last()]', 4], |
| 4082 | + insertE: coolkeyan_insertE, |
| 4083 | + scrollD: 1500 |
| 4084 | + } |
| 4085 | + }, // 酷科研 |
4074 | 4086 | stackoverflow: { |
4075 | 4087 | host: 'stackoverflow.com', |
4076 | 4088 | functionS: function() {if (indexOF('/questions') && !indexOF(/\/questions\/\d+\//)) { |
@@ -6199,6 +6211,28 @@ function: { |
6199 | 6211 | } |
6200 | 6212 |
|
6201 | 6213 |
|
| 6214 | + |
| 6215 | + // [酷科研] 获取下一页地址 |
| 6216 | + function coolkeyan_nextL() { |
| 6217 | + if (!getCSS('.q-img__image')) return |
| 6218 | + let id = getCSS('.q-breadcrumbs--last > span.q-breadcrumbs__el'), data |
| 6219 | + if (id && id.textContent) {id=parseInt(id.textContent)} else {return} |
| 6220 | + if (!document.nowPageNum) document.nowPageNum = 2 |
| 6221 | + data = `ratify_no=${id}&index=${document.nowPageNum}` |
| 6222 | + if (data === curSite.pageUrl) return |
| 6223 | + curSite.pageUrl = data |
| 6224 | + getPageElems_(location.origin + '/api/funds/nsfc/creport?' + data, 'json', 'GET'); // 访问下一页 URL 获取 |
| 6225 | + } |
| 6226 | + // [酷科研] 插入数据 |
| 6227 | + function coolkeyan_insertE(pageElems, type) { |
| 6228 | + if (!pageElems || pageElems == {}) {curSite.SiteTypeID = 0; return} |
| 6229 | + if (!pageElems.url) {curSite.SiteTypeID = 0; return} else {document.nowPageNum++} |
| 6230 | + pageNum.now = pageNum._now + 1 |
| 6231 | + getCSS('.q-img>div[style*="padding-bottom"]').style.paddingBottom = `${(document.nowPageNum * 1000) - 1000}px` |
| 6232 | + getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), `<div class="q-img__image absolute-full" style="background-size: contain; background-position: 50% 50%; background-image: url('${pageElems.url}'); top: ${(document.nowPageNum * 1000) - 2000}px"></div>`); |
| 6233 | + } |
| 6234 | + |
| 6235 | + |
6202 | 6236 | // -------------------------------------------------------- |
6203 | 6237 |
|
6204 | 6238 |
|
|
0 commit comments