Bilibili-Evolved/min/custom-control-background.min.js
2019-09-20 17:40:45 +08:00

1 line
698 B
JavaScript

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