Bilibili-Evolved/min/custom-control-background.min.js
2021-10-26 13:22:15 +08:00

1 line
616 B
JavaScript

(()=>(o,t)=>{addSettingsListener("customControlBackgroundOpacity",(o=>{document.documentElement.style.setProperty("--custom-control-background-opacity",o)}),true);const n=()=>{t.applyStyle("customControlBackgroundStyle");if(!o.touchVideoPlayer){t.applyImportantStyleFromText(`\n .bilibili-player-video-control-bottom\n {\n margin: 7px 0 0 0 !important;\n padding: 8px 0 0 !important;\n }\n`,"control-background-non-touch")}};n();return{reload:n,unload:()=>{t.removeStyle("customControlBackgroundStyle");const o=document.getElementById("control-background-non-touch");o&&o.remove()}}})();