mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add more reloadables
This commit is contained in:
parent
a64112a83d
commit
0da06796de
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -527,6 +527,8 @@ function loadResources()
|
|||||||
"videoScreenshot",
|
"videoScreenshot",
|
||||||
"blurVideoControl",
|
"blurVideoControl",
|
||||||
"customControlBackground",
|
"customControlBackground",
|
||||||
|
"harunaScale",
|
||||||
|
"removeLiveWatermark",
|
||||||
];
|
];
|
||||||
for (const [key, data] of Object.entries(Resource.manifest))
|
for (const [key, data] of Object.entries(Resource.manifest))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -527,6 +527,8 @@ function loadResources()
|
|||||||
"videoScreenshot",
|
"videoScreenshot",
|
||||||
"blurVideoControl",
|
"blurVideoControl",
|
||||||
"customControlBackground",
|
"customControlBackground",
|
||||||
|
"harunaScale",
|
||||||
|
"removeLiveWatermark",
|
||||||
];
|
];
|
||||||
for (const [key, data] of Object.entries(Resource.manifest))
|
for (const [key, data] of Object.entries(Resource.manifest))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,6 +17,8 @@ export function loadResources()
|
|||||||
"videoScreenshot",
|
"videoScreenshot",
|
||||||
"blurVideoControl",
|
"blurVideoControl",
|
||||||
"customControlBackground",
|
"customControlBackground",
|
||||||
|
"harunaScale",
|
||||||
|
"removeLiveWatermark",
|
||||||
];
|
];
|
||||||
for (const [key, data] of Object.entries(Resource.manifest))
|
for (const [key, data] of Object.entries(Resource.manifest))
|
||||||
{
|
{
|
||||||
|
|||||||
2
min/haruna-scale.min.js
vendored
2
min/haruna-scale.min.js
vendored
@ -1 +1 @@
|
|||||||
(()=>{return(n,t)=>{const a="bilibili-haruna-scale";if($(a).length===0){t.applyStyleFromText(`\n <style id='${a}'>\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n </style>\n `)}}})();
|
(()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n `,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})();
|
||||||
2
min/remove-watermark.min.js
vendored
2
min/remove-watermark.min.js
vendored
@ -1 +1 @@
|
|||||||
(()=>{return(i,l)=>{const n="bilibili-live-watermark";if($(`#${n}`).length===0){l.applyStyleFromText(`\n <style id='${n}'>\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n </style>\n `)}}})();
|
(()=>{return(e,n)=>{const t="remove-live-watermark";const l=()=>{if(document.getElementById(t)===null){n.applyStyleFromText(`\n .bilibili-live-player-video-logo\n {\n display: none !important;\n }\n `,t)}};l();return{reload:l,unload:()=>{const e=document.getElementById(t);e&&e.remove()}}}})();
|
||||||
@ -1,13 +1,22 @@
|
|||||||
const id = "bilibili-haruna-scale";
|
const id = "haruna-scale";
|
||||||
if ($(id).length === 0)
|
const load = () =>
|
||||||
{
|
{
|
||||||
resources.applyStyleFromText(/*html*/`
|
if (document.getElementById(id) === null)
|
||||||
<style id='${id}'>
|
{
|
||||||
|
resources.applyStyleFromText(`
|
||||||
.haruna-ctnr,
|
.haruna-ctnr,
|
||||||
.avatar-btn
|
.avatar-btn
|
||||||
{
|
{
|
||||||
transform: scale(${1 / window.devicePixelRatio}) !important;
|
transform: scale(${1 / window.devicePixelRatio}) !important;
|
||||||
}
|
}
|
||||||
</style>
|
`, id);
|
||||||
`);
|
}
|
||||||
}
|
};
|
||||||
|
load();
|
||||||
|
export default {
|
||||||
|
reload: load,
|
||||||
|
unload: () => {
|
||||||
|
const style = document.getElementById(id);
|
||||||
|
style && style.remove();
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -1,12 +1,22 @@
|
|||||||
const id = "bilibili-live-watermark";
|
const id = "remove-live-watermark";
|
||||||
if ($(`#${id}`).length === 0)
|
const load = () =>
|
||||||
{
|
{
|
||||||
resources.applyStyleFromText(/*html*/`
|
if (document.getElementById(id) === null)
|
||||||
<style id='${id}'>
|
{
|
||||||
|
resources.applyStyleFromText(`
|
||||||
.bilibili-live-player-video-logo
|
.bilibili-live-player-video-logo
|
||||||
{
|
{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
</style>
|
`, id);
|
||||||
`);
|
}
|
||||||
}
|
};
|
||||||
|
load();
|
||||||
|
export default {
|
||||||
|
reload: load,
|
||||||
|
unload: () =>
|
||||||
|
{
|
||||||
|
const style = document.getElementById(id);
|
||||||
|
style && style.remove();
|
||||||
|
},
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue
Block a user