mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 19:01:47 +00:00
Allow user to pass custom CSS file
This commit is contained in:
@ -32,9 +32,16 @@ module.exports.listenAction = (channel, callback) => {
|
||||
return ipcMain.on(channel, callback);
|
||||
};
|
||||
|
||||
module.exports.fileExists = (path, callbackIfExists) => {
|
||||
module.exports.fileExists = (
|
||||
path,
|
||||
callbackIfExists,
|
||||
callbackIfError = undefined
|
||||
) => {
|
||||
fs.access(path, fs.F_OK, (err) => {
|
||||
if (err) {
|
||||
if (callbackIfError) {
|
||||
callbackIfError();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user