mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-17 05:02:06 +00:00
lint
This commit is contained in:
@ -28,19 +28,17 @@ module.exports = (options) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function injectVolumeHud() {
|
function injectVolumeHud() {
|
||||||
const position = `top: 18px; right: 60px; z-index: 999; position: absolute;`;
|
const position = "top: 18px; right: 60px; z-index: 999; position: absolute;";
|
||||||
const mainStyle = "font-size: xx-large; padding: 10px; transition: opacity 1.5s"
|
const mainStyle = "font-size: xx-large; padding: 10px; transition: opacity 1.5s";
|
||||||
$(".center-content.ytmusic-nav-bar").insertAdjacentHTML('beforeend', `<span id="volumeHud" style="${position + mainStyle}"></span>`)
|
$(".center-content.ytmusic-nav-bar").insertAdjacentHTML("beforeend",
|
||||||
|
`<span id="volumeHud" style="${position + mainStyle}"></span>`)
|
||||||
}
|
}
|
||||||
|
|
||||||
let hudFadeTimeout;
|
let hudFadeTimeout;
|
||||||
|
|
||||||
function showVolumeHud(volume) {
|
function showVolumeHud(volume) {
|
||||||
let volumeHud = $('#volumeHud');
|
let volumeHud = $("#volumeHud");
|
||||||
if (!volumeHud) {
|
if (!volumeHud) return;
|
||||||
console.error("volumeHud Not Found !");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
volumeHud.textContent = volume + '%';
|
volumeHud.textContent = volume + '%';
|
||||||
volumeHud.style.opacity = 1;
|
volumeHud.style.opacity = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user