mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Add menu entry to copy current URL
This commit is contained in:
8
menu.js
8
menu.js
@ -3,6 +3,7 @@ const path = require("path");
|
||||
|
||||
const { app, Menu, dialog } = require("electron");
|
||||
const is = require("electron-is");
|
||||
const { writeSync: copyToClipboard } = require("clipboardy");
|
||||
const { restart } = require("./providers/app-controls");
|
||||
|
||||
const { getAllPlugins } = require("./plugins/utils");
|
||||
@ -329,6 +330,13 @@ const mainMenuTemplate = (win) => {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Copy current URL",
|
||||
click: () => {
|
||||
const currentURL = win.webContents.getURL();
|
||||
copyToClipboard(currentURL);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Restart App",
|
||||
click: restart
|
||||
|
||||
Reference in New Issue
Block a user