mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-07 22:55:35 +00:00
fix: 部分电脑无法复制的问题
This commit is contained in:
parent
ef273bd9dd
commit
5f87067a75
22
electron/electron.js
vendored
22
electron/electron.js
vendored
@ -145,28 +145,6 @@ function createMainWindow() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
|
|
||||||
const allowedPermissions = [
|
|
||||||
'cookies', // cookies
|
|
||||||
'media', // 摄像头和麦克风
|
|
||||||
'notifications', // 通知
|
|
||||||
'clipboard-read', // 剪贴板读取
|
|
||||||
'clipboard-write' // 剪贴板写入
|
|
||||||
];
|
|
||||||
callback(allowedPermissions.includes(permission));
|
|
||||||
});
|
|
||||||
|
|
||||||
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission) => {
|
|
||||||
const allowedPermissions = [
|
|
||||||
'cookies',
|
|
||||||
'media',
|
|
||||||
'notifications',
|
|
||||||
'clipboard-read',
|
|
||||||
'clipboard-write'
|
|
||||||
];
|
|
||||||
return allowedPermissions.includes(permission);
|
|
||||||
});
|
|
||||||
|
|
||||||
mainWindow.on('page-title-updated', (event, title) => {
|
mainWindow.on('page-title-updated', (event, title) => {
|
||||||
if (title == "index.html") {
|
if (title == "index.html") {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user