(()=>{return(e,n)=>{if(document.querySelector(`.z_header`)!==null){n.removeStyle("tweetsStyle");return}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.select(()=>document.querySelector(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.classList.add("preserve-rank");if(!e.querySelector("a.icons-enabled")){e.insertAdjacentHTML("afterbegin",`\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.select(()=>document.querySelector(".nav-wrapper .searchform,.nav-con #nav_searchform"),e=>{e.classList.remove("preserve-rank");const n=e.querySelector("a.icons-enabled");n&&n.remove()})}SpinQuery.any(()=>$("#banner_link"),()=>n.removeStyle("tweetsStyle"));if(!e.showBanner){n.applyStyle("noBannerStyle")}else{n.removeStyle("noBannerStyle")}}})();