mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 18:21:47 +00:00
Plugin: Captions Selector
This commit is contained in:
15
plugins/captions-selector/back.js
Normal file
15
plugins/captions-selector/back.js
Normal file
@ -0,0 +1,15 @@
|
||||
const { ipcMain, dialog } = require("electron");
|
||||
|
||||
module.exports = () => {
|
||||
ipcMain.handle('captionsSelector', async (_, captionLabels, currentIndex) => {
|
||||
return await dialog.showMessageBox({
|
||||
type: "question",
|
||||
buttons: captionLabels,
|
||||
defaultId: currentIndex,
|
||||
title: "Choose Caption",
|
||||
message: "Choose Caption:",
|
||||
detail: `Current Caption: ${captionLabels[currentIndex]}`,
|
||||
cancelId: -1
|
||||
})
|
||||
})
|
||||
};
|
||||
Reference in New Issue
Block a user