mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Revert changes
This commit is contained in:
parent
f952d90a66
commit
93d076e9fb
@ -2,73 +2,57 @@
|
||||
{
|
||||
return (settings, resources) =>
|
||||
{
|
||||
$("#bilibili-new-style").remove();
|
||||
$("#bilibili-nav-bar-override").remove();
|
||||
$("#bilibili-banner-override").remove();
|
||||
|
||||
waitForQuery()(
|
||||
() => $(".nav-search-keyword"),
|
||||
it => it.length > 0,
|
||||
textBox => textBox.attr("placeholder", settings.useNewStyle ? "搜索" : "")
|
||||
textBox => textBox.attr("placeholder", "搜索")
|
||||
);
|
||||
waitForQuery()(
|
||||
() => $(settings.useNewStyle ? ".custom-scrollbar" : ".removed-custom-scrollbar"),
|
||||
() => $(".custom-scrollbar"),
|
||||
it => it.length > 0,
|
||||
it =>
|
||||
{
|
||||
if (settings.useNewStyle)
|
||||
{
|
||||
it.removeClass("custom-scrollbar").addClass("removed-custom-scrollbar");
|
||||
}
|
||||
else
|
||||
{
|
||||
it.removeClass("removed-custom-scrollbar").addClass("custom-scrollbar");
|
||||
}
|
||||
}
|
||||
it => it.removeClass("custom-scrollbar")
|
||||
);
|
||||
if (settings.useNewStyle)
|
||||
const navbar = document.getElementsByClassName("bili-wrapper")[0];
|
||||
let stardustStyles = false;
|
||||
if (navbar instanceof Element)
|
||||
{
|
||||
const navbar = document.getElementsByClassName("bili-wrapper")[0];
|
||||
let stardustStyles = false;
|
||||
if (navbar instanceof Element)
|
||||
{
|
||||
stardustStyles = parseInt(window.getComputedStyle(navbar).height) === 50;
|
||||
}
|
||||
let styles = "";
|
||||
if (stardustStyles)
|
||||
{
|
||||
styles = resources.getStyle("style", "bilibili-new-style");
|
||||
}
|
||||
else
|
||||
{
|
||||
styles = resources.getStyle("oldStyle", "bilibili-new-style");
|
||||
}
|
||||
$("body").after(styles);
|
||||
stardustStyles = parseInt(window.getComputedStyle(navbar).height) === 50;
|
||||
}
|
||||
let styles = "";
|
||||
if (stardustStyles)
|
||||
{
|
||||
styles = resources.getStyle("style", "bilibili-new-style");
|
||||
}
|
||||
else
|
||||
{
|
||||
styles = resources.getStyle("oldStyle", "bilibili-new-style");
|
||||
}
|
||||
$("#bilibili-new-style").remove();
|
||||
$("body").after(styles);
|
||||
|
||||
if (settings.overrideNavBar)
|
||||
{
|
||||
waitForQuery()(
|
||||
() => $(".search"),
|
||||
it => it.length > 0 && $(".nav-con.fr").length > 0,
|
||||
textBox =>
|
||||
{
|
||||
textBox.detach()
|
||||
.insertAfter(".nav-con.fr");
|
||||
}
|
||||
);
|
||||
waitForQuery()(
|
||||
() => $("input.search-keyword"),
|
||||
it => it.length > 0,
|
||||
textBox => textBox.attr("placeholder", "搜索")
|
||||
);
|
||||
const navBarStyles = resources.getStyle("navbarOverrideStyle", "bilibili-nav-bar-override");
|
||||
$("body").after(navBarStyles);
|
||||
|
||||
if (!settings.showBanner)
|
||||
if (settings.overrideNavBar)
|
||||
{
|
||||
waitForQuery()(
|
||||
() => $(".search"),
|
||||
it => it.length > 0 && $(".nav-con.fr").length > 0,
|
||||
textBox =>
|
||||
{
|
||||
const bannerStyles = resources.getStyle("noBannerStyle", "bilibili-banner-override");
|
||||
$("body").after(bannerStyles);
|
||||
textBox.detach()
|
||||
.insertAfter(".nav-con.fr");
|
||||
}
|
||||
);
|
||||
waitForQuery()(
|
||||
() => $("input.search-keyword"),
|
||||
it => it.length > 0,
|
||||
textBox => textBox.attr("placeholder", "搜索")
|
||||
);
|
||||
const navBarStyles = resources.getStyle("navbarOverrideStyle", "bilibili-nav-bar-override");
|
||||
$("body").after(navBarStyles);
|
||||
|
||||
if (!settings.showBanner)
|
||||
{
|
||||
const bannerStyles = resources.getStyle("noBannerStyle", "bilibili-banner-override");
|
||||
$("body").after(bannerStyles);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
2
style/new-styles.min.js
vendored
2
style/new-styles.min.js
vendored
@ -1 +1 @@
|
||||
(()=>(e,r)=>{if($("#bilibili-new-style").remove(),$("#bilibili-nav-bar-override").remove(),$("#bilibili-banner-override").remove(),waitForQuery()(()=>$(".nav-search-keyword"),e=>e.length>0,r=>r.attr("placeholder",e.useNewStyle?"搜索":"")),waitForQuery()(()=>$(e.useNewStyle?".custom-scrollbar":".removed-custom-scrollbar"),e=>e.length>0,r=>{e.useNewStyle?r.removeClass("custom-scrollbar").addClass("removed-custom-scrollbar"):r.removeClass("removed-custom-scrollbar").addClass("custom-scrollbar")}),e.useNewStyle){const l=document.getElementsByClassName("bili-wrapper")[0];let t=!1;l instanceof Element&&(t=50===parseInt(window.getComputedStyle(l).height));let i="";if(i=t?r.getStyle("style","bilibili-new-style"):r.getStyle("oldStyle","bilibili-new-style"),$("body").after(i),e.overrideNavBar){waitForQuery()(()=>$(".search"),e=>e.length>0&&$(".nav-con.fr").length>0,e=>{e.detach().insertAfter(".nav-con.fr")}),waitForQuery()(()=>$("input.search-keyword"),e=>e.length>0,e=>e.attr("placeholder","搜索"));const l=r.getStyle("navbarOverrideStyle","bilibili-nav-bar-override");if($("body").after(l),!e.showBanner){const e=r.getStyle("noBannerStyle","bilibili-banner-override");$("body").after(e)}}}})();
|
||||
(()=>(settings,resources)=>{waitForQuery()(()=>$(".nav-search-keyword"),it=>it.length>0,textBox=>textBox.attr("placeholder","搜索")),waitForQuery()(()=>$(".custom-scrollbar"),it=>it.length>0,it=>it.removeClass("custom-scrollbar"));const navbar=document.getElementsByClassName("bili-wrapper")[0];let stardustStyles=!1;navbar instanceof Element&&(stardustStyles=50===parseInt(window.getComputedStyle(navbar).height));let styles="";if(styles=stardustStyles?resources.getStyle("style","bilibili-new-style"):resources.getStyle("oldStyle","bilibili-new-style"),$("#bilibili-new-style").remove(),$("body").after(styles),settings.overrideNavBar){waitForQuery()(()=>$(".search"),it=>it.length>0&&$(".nav-con.fr").length>0,textBox=>{textBox.detach().insertAfter(".nav-con.fr")}),waitForQuery()(()=>$("input.search-keyword"),it=>it.length>0,textBox=>textBox.attr("placeholder","搜索"));const navBarStyles=resources.getStyle("navbarOverrideStyle","bilibili-nav-bar-override");if($("body").after(navBarStyles),!settings.showBanner){const bannerStyles=resources.getStyle("noBannerStyle","bilibili-banner-override");$("body").after(bannerStyles)}}})();
|
||||
@ -21,10 +21,6 @@
|
||||
left: 0;
|
||||
transform: rotate(120deg);
|
||||
}
|
||||
.gui-settings svg path
|
||||
{
|
||||
fill: #eee4;
|
||||
}
|
||||
.gui-settings:hover svg path
|
||||
{
|
||||
fill: #eee8;
|
||||
@ -165,7 +161,7 @@ button.save
|
||||
{
|
||||
padding: 0.5rem 2rem;
|
||||
border: none;
|
||||
background: $customStyleColor;
|
||||
background: $customStyleColor80;
|
||||
color: $foreground;
|
||||
border-radius: 4px;
|
||||
font-size: 1rem;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user