-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from Araxeus/precise-volume-HUD
precise-volume plugin fixes & updates
- Loading branch information
Showing
4 changed files
with
143 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
const { isEnabled } = require("../../config/plugins"); | ||
|
||
/* | ||
This is used to determine if plugin is actually active | ||
(not if its only enabled in options) | ||
*/ | ||
let enabled = false; | ||
|
||
module.exports = (win) => { | ||
enabled = true; | ||
|
||
// youtube-music register some of the target listeners after DOMContentLoaded | ||
// did-finish-load is called after all elements finished loading, including said listeners | ||
// Thats the reason the timing is controlled from main | ||
win.webContents.once("did-finish-load", () => { | ||
win.webContents.send("restoreAddEventListener"); | ||
win.webContents.send("setupVideoPlayerVolumeMousewheel", !isEnabled("hide-video-player")); | ||
}); | ||
}; | ||
module.exports = () => enabled = true; | ||
|
||
module.exports.enabled = () => { | ||
return enabled; | ||
}; | ||
module.exports.enabled = () => enabled; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters