Add more reloadables

This commit is contained in:
the1812 2019-05-31 16:32:42 +08:00
parent a64112a83d
commit 0da06796de
9 changed files with 51 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -527,6 +527,8 @@ function loadResources()
"videoScreenshot",
"blurVideoControl",
"customControlBackground",
"harunaScale",
"removeLiveWatermark",
];
for (const [key, data] of Object.entries(Resource.manifest))
{

View File

@ -527,6 +527,8 @@ function loadResources()
"videoScreenshot",
"blurVideoControl",
"customControlBackground",
"harunaScale",
"removeLiveWatermark",
];
for (const [key, data] of Object.entries(Resource.manifest))
{

View File

@ -17,6 +17,8 @@ export function loadResources()
"videoScreenshot",
"blurVideoControl",
"customControlBackground",
"harunaScale",
"removeLiveWatermark",
];
for (const [key, data] of Object.entries(Resource.manifest))
{

View File

@ -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()}}}})();

View File

@ -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()}}}})();

View File

@ -1,13 +1,22 @@
const id = "bilibili-haruna-scale";
if ($(id).length === 0)
const id = "haruna-scale";
const load = () =>
{
resources.applyStyleFromText(/*html*/`
<style id='${id}'>
if (document.getElementById(id) === null)
{
resources.applyStyleFromText(`
.haruna-ctnr,
.avatar-btn
{
transform: scale(${1 / window.devicePixelRatio}) !important;
}
</style>
`);
}
`, id);
}
};
load();
export default {
reload: load,
unload: () => {
const style = document.getElementById(id);
style && style.remove();
},
};

View File

@ -1,12 +1,22 @@
const id = "bilibili-live-watermark";
if ($(`#${id}`).length === 0)
const id = "remove-live-watermark";
const load = () =>
{
resources.applyStyleFromText(/*html*/`
<style id='${id}'>
if (document.getElementById(id) === null)
{
resources.applyStyleFromText(`
.bilibili-live-player-video-logo
{
display: none !important;
}
</style>
`);
}
`, id);
}
};
load();
export default {
reload: load,
unload: () =>
{
const style = document.getElementById(id);
style && style.remove();
},
};