feat: add the option to copy the URL

This commit is contained in:
mio
2023-05-17 23:34:44 +08:00
parent a2dcda6be0
commit 82f42e56db
7 changed files with 34 additions and 3 deletions

11
src/main/bridge.js Normal file
View File

@ -0,0 +1,11 @@
const { clipboard, ipcMain } = require('electron')
const { getUrl } = require('./getData')
ipcMain.handle('COPY_URL', async () => {
const url = await getUrl()
if (url) {
clipboard.writeText(url)
return true
}
return false
})