Bilibili-Evolved/style/dark/dark-styles.js
2018-12-13 17:07:14 +08:00

31 lines
946 B
JavaScript

(() =>
{
return (settings, resources) =>
{
if (settings.useDarkStyle)
{
resources.applyStyle("scrollbarStyle");
SpinQuery.any(
() => $(".custom-scrollbar"),
it => it.removeClass("custom-scrollbar")
);
if ($("#banner_link").length === 0 ||
$("#banner_link").length > 0 &&
settings.overrideNavBar &&
!settings.showBanner)
{
resources.applyImportantStyle("darkStyleNavBar");
}
resources.applyStyle("darkStyle");
resources.applyImportantStyle("darkStyleImportant");
}
else
{
resources.removeStyle("scrollbarStyle");
resources.removeStyle("darkStyleNavBar");
resources.removeStyle("darkStyle");
resources.removeStyle("darkStyleImportant");
}
};
})();