Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const waitForExternal = setInterval(() => {
if (serviceReady()) {
clearInterval(waitForExternal);
if (service === 'youtube-music') {
const YTMusic = require('ytmusic.js');
window.GMusic = YTMusic;
window.GPM = new YTMusic();
require('./mock-gpusic-ui');
// TODO: Implement theming support
window.GPMTheme = {
updateTheme() {},
enable() {},
disable() {},
};
} else {
const GMusic = require('gmusic.js');
window.GMusic = GMusic;
// Google Play Music
require('gmusic-ui.js')(GMusic);
require('gmusic-mini-player.js')(GMusic);
const GMusicTheme = require('gmusic-theme.js');
window.GPM = new GMusic();