Merge branch 'master' into new-auto-confirm

This commit is contained in:
Araxeus
2021-10-19 15:19:58 +03:00
committed by GitHub
7 changed files with 280 additions and 106 deletions

View File

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