Unified · Split
| @@ -7,6 +7,7 @@ import * as Path from "node:path"; · 6 unmodified lines | ||
| 7 | 7 | import { |
| 8 | 8 | app, |
| 9 | 9 | BrowserWindow, |
| 10 | + clipboard, | |
| 10 | 11 | dialog, |
| 11 | 12 | ipcMain, |
| 12 | 13 | Menu, |
| @@ -1572,6 +1573,14 @@ function createWindow(): BrowserWindow { · 1559 unmodified lines | ||
| 1572 | 1573 | menuTemplate.push({ type: "separator" }); |
| 1573 | 1574 | } |
| 1574 | 1575 | |
| 1576 | + const externalUrl = getSafeExternalUrl(params.linkURL); | |
| 1577 | + if (externalUrl) { | |
| 1578 | + menuTemplate.push( | |
| 1579 | + { label: "Copy Link", click: () => clipboard.writeText(params.linkURL) }, | |
| 1580 | + { type: "separator" }, | |
| 1581 | + ); | |
| 1582 | + } | |
| 1583 | + | |
| 1575 | 1584 | menuTemplate.push( |
| 1576 | 1585 | { role: "cut", enabled: params.editFlags.canCut }, |
| 1577 | 1586 | { role: "copy", enabled: params.editFlags.canCopy }, |