mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
29 lines
982 B
JavaScript
29 lines
982 B
JavaScript
document.body.style.setProperty("--custom-control-background-opacity", settings.customControlBackgroundOpacity);
|
|
addSettingsListener("customControlBackgroundOpacity", value =>
|
|
{
|
|
document.body.style.setProperty("--custom-control-background-opacity", value);
|
|
});
|
|
const load = () => {
|
|
resources.applyStyle("customControlBackgroundStyle");
|
|
if (!settings.touchVideoPlayer)
|
|
{
|
|
resources.applyImportantStyleFromText(/*html*/`
|
|
<style id="control-background-non-touch">
|
|
.bilibili-player-video-control-bottom
|
|
{
|
|
margin: 7px 0 0 0 !important;
|
|
padding: 8px 0 0 !important;
|
|
}
|
|
</style>
|
|
`);
|
|
}
|
|
};
|
|
load();
|
|
export default {
|
|
reload: load,
|
|
unload: () => {
|
|
resources.removeStyle("customControlBackgroundStyle");
|
|
const nonTouchStyle = document.getElementById("control-background-non-touch");
|
|
nonTouchStyle && nonTouchStyle.remove();
|
|
},
|
|
}; |