mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bugs
This commit is contained in:
parent
986eabf1d7
commit
49f4202c62
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/custom-control-background.min.js
vendored
2
min/custom-control-background.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{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=()=>{if(o.customControlBackgroundOpacity>0){t.applyStyle("customControlBackgroundStyle");if(!o.touchVideoPlayer){t.applyImportantStyleFromText(`\n <style id="control-background-non-touch">\n .bilibili-player-video-control-bottom\n {\n margin: 7px 0 0 0 !important;\n padding: 8px 0 0 !important;\n }\n </style>\n `)}}};return{reload:n,unload:()=>{t.removeStyle("customControlBackgroundStyle");const o=document.getElementById("control-background-non-touch");o&&o.remove()}}}})();
|
||||
(()=>{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 {\n margin: 7px 0 0 0 !important;\n padding: 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()}}}})();
|
||||
@ -4,12 +4,10 @@ addSettingsListener("customControlBackgroundOpacity", value =>
|
||||
document.body.style.setProperty("--custom-control-background-opacity", value);
|
||||
});
|
||||
const load = () => {
|
||||
if (settings.customControlBackgroundOpacity > 0)
|
||||
resources.applyStyle("customControlBackgroundStyle");
|
||||
if (!settings.touchVideoPlayer)
|
||||
{
|
||||
resources.applyStyle("customControlBackgroundStyle");
|
||||
if (!settings.touchVideoPlayer)
|
||||
{
|
||||
resources.applyImportantStyleFromText(/*html*/`
|
||||
resources.applyImportantStyleFromText(/*html*/`
|
||||
<style id="control-background-non-touch">
|
||||
.bilibili-player-video-control-bottom
|
||||
{
|
||||
@ -18,9 +16,9 @@ const load = () => {
|
||||
}
|
||||
</style>
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
load();
|
||||
export default {
|
||||
reload: load,
|
||||
unload: () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user