Skip to content

Commit e6ec779

Browse files
committed
优化 B 站新版搜索页
1 parent 03fefe3 commit e6ec779

2 files changed

Lines changed: 4 additions & 22 deletions

File tree

Autopage.user.js

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// @name:en AutoPager
66
// @version 5.4.1
77
// @author X.I.U
8-
// @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、龙的天空、起点中文、千图网、千库网、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(以上仅一小部分,更多的写不下了...
8+
// @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(以上仅一小部分,更多的写不下了...
99
// @description:zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
1010
// @description:en Append the next page content to the bottom seamlessly (like a waterfall)~
1111
// @match *://*/*
@@ -669,9 +669,9 @@ function: {
669669
host: 'search.bilibili.com',
670670
url: ()=> {
671671
urlC = true;
672-
if (lp == '/all' || lp == '/video') {
672+
if ((lp == '/all' || lp == '/video') && getCSS('ul.video-list') != null) {
673673
curSite = DBSite.bilibili_search;
674-
} else if (lp == '/article') {
674+
} else if (lp == '/article' && getCSS('#article-list') != null) {
675675
curSite = DBSite.bilibili_search_article;
676676
}
677677
},
@@ -1545,24 +1545,6 @@ function: {
15451545
// 插入 Style CSS 样式
15461546
if (curSite.style) insStyle(curSite.style)
15471547

1548-
// 对翻页模式 5 的子 iframe 添加一个跟随滚动的事件
1549-
/*if (curSite.pager && curSite.pager.type === 5 && self != top) {
1550-
var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
1551-
window.addEventListener('scroll', function (e) {
1552-
let scrollTop = window.parent.document.documentElement.scrollTop || window.parent.document.body.scrollTop,
1553-
clientHeight = window.parent.document.documentElement.clientHeight || window.parent.document.body.clientHeight,
1554-
scrollHeight = window.parent.document.documentElement.scrollHeight || window.parent.document.body.scrollHeight,
1555-
afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
1556-
delta = afterScrollTop - beforeScrollTop;
1557-
if (delta == 0) return false;
1558-
beforeScrollTop = afterScrollTop;
1559-
//console.log(delta, scrollHeight - (scrollTop + clientHeight), '2222')
1560-
if (delta > 0 && scrollTop + clientHeight < scrollHeight) {
1561-
window.parent.scrollBy(0, delta);
1562-
}
1563-
}, false);
1564-
}*/
1565-
15661548
// 自动无缝翻页
15671549
pageLoading();
15681550

DarkMode.user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@
396396
case 3:
397397
style += style_31;
398398
if (location.hostname.indexOf('search.bilibili.com') > -1) {
399-
style += `ul.video-list[type="video"] img, ul.video-list[type="video"] .video-item .img .mask-video, ul.video-list[type="video"] .video-item .img .van-danmu, ul.video-list[type="video"] .video-item .img .van-framepreview {filter: none !important;}`
399+
style += `ul.video-list img, ul.video-list .video-item .img .mask-video, ul.video-list .video-item .img .van-danmu, ul.video-list .video-item .img .van-framepreview {filter: none !important;}`
400400
} else if (location.hostname.indexOf('.bilibili.com') > -1) {
401401
style += `#bilibiliPlayer video, .video-item .img .mask-video, .video-item .img .van-danmu, .video-item .img .van-framepreview {filter: none !important;} #bilibiliPlayer:not(.mode-fullscreen), #bilibiliPlayer:not(.mode-fullscreen) .bilibili-player-video-sendbar {filter: invert(1) !important;} .bilibili-player.bilibili-player-area-v1, .bilibili-player.bilibili-player-area-v3, #bilibiliPlayer {box-shadow: none !important;} * {font-weight: bold !important;}`
402402
} else if (location.hostname.indexOf('.huya.com') > -1) {

0 commit comments

Comments
 (0)