mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 19:01:47 +00:00
apply fix from eslint
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
const { injectCSS } = require('../utils');
|
||||
|
||||
const path = require('node:path');
|
||||
|
||||
const { globalShortcut } = require('electron');
|
||||
|
||||
const { injectCSS } = require('../utils');
|
||||
|
||||
/*
|
||||
This is used to determine if plugin is actually active
|
||||
(not if its only enabled in options)
|
||||
*/
|
||||
let enabled = false;
|
||||
|
||||
const { globalShortcut } = require('electron');
|
||||
|
||||
module.exports = (win, options) => {
|
||||
enabled = true;
|
||||
injectCSS(win.webContents, path.join(__dirname, 'volume-hud.css'));
|
||||
|
||||
@ -26,7 +26,7 @@ const writeOptions = debounce(() => {
|
||||
setOptions('precise-volume', options);
|
||||
}, 1000);
|
||||
|
||||
module.exports.moveVolumeHud = debounce((showVideo) => {
|
||||
const moveVolumeHud = debounce((showVideo) => {
|
||||
const volumeHud = $('#volumeHud');
|
||||
if (!volumeHud) {
|
||||
return;
|
||||
@ -36,6 +36,7 @@ module.exports.moveVolumeHud = debounce((showVideo) => {
|
||||
? `${($('ytmusic-player').clientHeight - $('video').clientHeight) / 2}px`
|
||||
: 0;
|
||||
}, 250);
|
||||
module.exports.moveVolumeHud = moveVolumeHud;
|
||||
|
||||
const hideVolumeHud = debounce((volumeHud) => {
|
||||
volumeHud.style.opacity = 0;
|
||||
@ -215,7 +216,7 @@ const tooltipTargets = [
|
||||
];
|
||||
|
||||
function setTooltip(volume) {
|
||||
for (target of tooltipTargets) {
|
||||
for (const target of tooltipTargets) {
|
||||
$(target).title = `${volume}%`;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ const { setMenuOptions } = require('../../config/plugins');
|
||||
const promptOptions = require('../../providers/prompt-options');
|
||||
|
||||
function changeOptions(changedOptions, options, win) {
|
||||
for (option in changedOptions) {
|
||||
for (const option in changedOptions) {
|
||||
options[option] = changedOptions[option];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user