mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
feat: remove unnecessary export default for better tree-shaking
This commit is contained in:
@ -2,7 +2,7 @@ import path from 'node:path';
|
||||
|
||||
import { app, BrowserWindow, ipcMain } from 'electron';
|
||||
|
||||
import config from '@/config';
|
||||
import * as config from '@/config';
|
||||
|
||||
export const restart = () => restartInternal();
|
||||
|
||||
|
||||
@ -2,5 +2,3 @@ export const getSongMenu = () =>
|
||||
document.querySelector<HTMLElement>(
|
||||
'ytmusic-menu-popup-renderer tp-yt-paper-listbox',
|
||||
);
|
||||
|
||||
export default { getSongMenu };
|
||||
|
||||
@ -2,7 +2,7 @@ import path from 'node:path';
|
||||
|
||||
import { app, type BrowserWindow } from 'electron';
|
||||
|
||||
import getSongControls from './song-controls';
|
||||
import { getSongControls } from './song-controls';
|
||||
|
||||
export const APP_PROTOCOL = 'youtubemusic';
|
||||
|
||||
@ -36,10 +36,3 @@ export function changeProtocolHandler(
|
||||
) {
|
||||
protocolHandler = f;
|
||||
}
|
||||
|
||||
export default {
|
||||
APP_PROTOCOL,
|
||||
setupProtocolHandler,
|
||||
handleProtocol,
|
||||
changeProtocolHandler,
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ const parseStringFromArgsType = (args: ArgsType<string>) => {
|
||||
}
|
||||
};
|
||||
|
||||
export default (win: BrowserWindow) => {
|
||||
export const getSongControls = (win: BrowserWindow) => {
|
||||
return {
|
||||
// Playback
|
||||
previous: () => win.webContents.send('ytmd:previous-video'),
|
||||
|
||||
@ -189,7 +189,7 @@ export const setupAutoPlayChangedListener = singleton(() => {
|
||||
});
|
||||
});
|
||||
|
||||
export default (api: YoutubePlayer) => {
|
||||
export const setupSongInfo = (api: YoutubePlayer) => {
|
||||
window.ipcRenderer.on('ytmd:setup-time-changed-listener', () => {
|
||||
setupTimeChangedListener();
|
||||
});
|
||||
|
||||
@ -2,7 +2,7 @@ import { type BrowserWindow, ipcMain, nativeImage, net } from 'electron';
|
||||
|
||||
import { Mutex } from 'async-mutex';
|
||||
|
||||
import config from '@/config';
|
||||
import * as config from '@/config';
|
||||
|
||||
import type { GetPlayerResponse } from '@/types/get-player-response';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user