mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bug in override navbar
This commit is contained in:
parent
7737b806e8
commit
b544b45d41
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/override-navbar.min.js
vendored
2
min/override-navbar.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,n)=>{SpinQuery.any(()=>$(".head-content.bili-wrapper>div.search:not(.filter-item)"),e=>{e.detach().insertAfter(".nav-con.fr")});if(e.preserveRank){SpinQuery.any(()=>$(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.addClass("preserve-rank");if(e.find("a.icons-enabled").length===0){e.prepend(`\n <a title="排行榜"\n class="icons-enabled"\n href="https://www.bilibili.com/ranking"\n target="_blank">\n <i class="icon-rank"></i>\n </a>\n `)}})}else{SpinQuery.any(()=>$(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.removeClass("preserve-rank");e.find("a.icons-enabled").remove()})}SpinQuery.any(()=>$("#banner_link"),()=>n.removeStyle("tweetsStyle"));if(!e.showBanner){n.applyStyle("noBannerStyle")}else{n.removeStyle("noBannerStyle")}}})();
|
||||
(()=>{return(e,n)=>{SpinQuery.any(()=>$(".head-content.bili-wrapper>div.search:not(.filter-item)"),e=>{const n=$(document.querySelector(".nav-con.fr"));e.detach().insertAfter(n)});if(e.preserveRank){SpinQuery.any(()=>$(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.addClass("preserve-rank");if(e.find("a.icons-enabled").length===0){e.prepend(`\n <a title="排行榜"\n class="icons-enabled"\n href="https://www.bilibili.com/ranking"\n target="_blank">\n <i class="icon-rank"></i>\n </a>\n `)}})}else{SpinQuery.any(()=>$(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.removeClass("preserve-rank");e.find("a.icons-enabled").remove()})}SpinQuery.any(()=>$("#banner_link"),()=>n.removeStyle("tweetsStyle"));if(!e.showBanner){n.applyStyle("noBannerStyle")}else{n.removeStyle("noBannerStyle")}}})();
|
||||
@ -6,7 +6,8 @@
|
||||
() => $(".head-content.bili-wrapper>div.search:not(.filter-item)"),
|
||||
textBox =>
|
||||
{
|
||||
textBox.detach().insertAfter(".nav-con.fr");
|
||||
const rightNavbar = $(document.querySelector(".nav-con.fr"));
|
||||
textBox.detach().insertAfter(rightNavbar);
|
||||
},
|
||||
);
|
||||
if (settings.preserveRank)
|
||||
@ -19,13 +20,13 @@
|
||||
if (searchForm.find("a.icons-enabled").length === 0)
|
||||
{
|
||||
searchForm.prepend(`
|
||||
<a title="排行榜"
|
||||
class="icons-enabled"
|
||||
href="https://www.bilibili.com/ranking"
|
||||
target="_blank">
|
||||
<i class="icon-rank"></i>
|
||||
</a>
|
||||
`);
|
||||
<a title="排行榜"
|
||||
class="icons-enabled"
|
||||
href="https://www.bilibili.com/ranking"
|
||||
target="_blank">
|
||||
<i class="icon-rank"></i>
|
||||
</a>
|
||||
`);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user