mirror of
https://github.com/XIU2/UserScript.git
synced 2026-10-07 15:54:20 +00:00
优化 [部分 自带无缝翻页 网站] 通用规则
This commit is contained in:
+3
-3
@@ -3,7 +3,7 @@
|
||||
// @name:zh-CN 自动无缝翻页
|
||||
// @name:zh-TW 自動無縫翻頁
|
||||
// @name:en AutoPager
|
||||
// @version 5.7.2
|
||||
// @version 5.7.3
|
||||
// @author X.I.U
|
||||
// @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、微博、NGA、V2EX、煎蛋网、龙的天空、起点中文、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、RuTracker、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
|
||||
// @description:zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
|
||||
@@ -256,7 +256,7 @@
|
||||
} else if (getAllCSS('.load-more, .loadmore, #load-more, #loadmore, .show_more').length === 1) {
|
||||
console.info(`[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 1`); return 8;
|
||||
|
||||
} else if (getAllXpath('//*[text()="加载更多" or text()="查看更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]').length === 1) {
|
||||
} else if (getAllXpath('//*[text()="加载更多" or text()="查看更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]').length === 1 && location.hostname.indexOf('www.smzdm.com') == -1) {
|
||||
console.info(`[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 2`); return 9;
|
||||
|
||||
} else if (getCSS('link[href*="/wp-content/" i], script[src*="/wp-content/" i]')) {
|
||||
@@ -3461,7 +3461,7 @@ function: {
|
||||
}
|
||||
// 插入网页
|
||||
let _style = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.3;transition: .2s;z-index: 9999 !important;cursor: pointer;user-select: none !important;flex-direction: column;align-items: center;justify-content: center;box-sizing: content-box;border-radius: 0 50% 50% 0;transform-origin: center !important;transform: translateX(-8px);background-color: #eee;-webkit-tap-highlight-color: transparent;box-shadow: 1px 1px 3px 0px #aaa !important;color: #000 !important;font-size: medium;} #Autopage_number:hover {opacity: 0.8;transform: translateX(0);}</style>`,
|
||||
_html = `<div id="Autopage_number" title="1. 此为 [当前页码](仅指脚本翻了多少页,并非实际页码,该页码可在脚本菜单中关闭) 2. 鼠标 [左键] 点击此处可 [临时暂停翻页](再次点击可恢复) 3. 鼠标 [右键] 点击此处可 [回到顶部]">${pageNum._now}</div>`
|
||||
_html = `<div id="Autopage_number" title="1. 此为【当前页码】(仅指脚本翻了多少页,并非实际页码,该页码可在脚本菜单中关闭) 2. 鼠标【左键】点击此处可【临时暂停翻页】(再次点击可恢复) 3. 鼠标【右键】点击此处可【回到顶部】">${pageNum._now}</div>`
|
||||
document.documentElement.insertAdjacentHTML('beforeend', _style + _html);
|
||||
// 解决 远景论坛 会清理掉前面插入的 CSS 样式的问题
|
||||
if (location.hostname === 'bbs.pcbeta.com') {setTimeout(function(){document.documentElement.insertAdjacentHTML('beforeend', _style);}, 500);}
|
||||
|
||||
Reference in New Issue
Block a user