mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Merge pull request #380 from cpiber/discord
Fix discord clearActivity, menu, listen along option
This commit is contained in:
@ -40,6 +40,9 @@ const getArtist = async (win) => {
|
||||
}
|
||||
|
||||
// Fill songInfo with empty values
|
||||
/**
|
||||
* @typedef {songInfo} SongInfo
|
||||
*/
|
||||
const songInfo = {
|
||||
title: "",
|
||||
artist: "",
|
||||
@ -72,6 +75,14 @@ const handleData = async (responseText, win) => {
|
||||
const callbacks = [];
|
||||
|
||||
// This function will allow plugins to register callback that will be triggered when data changes
|
||||
/**
|
||||
* @callback songInfoCallback
|
||||
* @param {songInfo} songInfo
|
||||
* @returns {void}
|
||||
*/
|
||||
/**
|
||||
* @param {songInfoCallback} callback
|
||||
*/
|
||||
const registerCallback = (callback) => {
|
||||
callbacks.push(callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user