Add menu entry to copy current URL

This commit is contained in:
TC
2023-01-14 23:09:15 +01:00
parent 3a822f611a
commit b541dd0312
3 changed files with 101 additions and 3 deletions

View File

@ -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