Skip to content

Commit

Permalink
为截图绑定了新的功能键(CmdOrCtrl+PrintScreen),修正了截图音效的播放
Browse files Browse the repository at this point in the history
  • Loading branch information
iamapig120 committed Jan 20, 2019
1 parent 814b6b4 commit 322224d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
server.get('*', Util.processRequest)

electronApp.commandLine.appendSwitch('ignore-certificate-errors')
electronApp.commandLine.appendSwitch(
'autoplay-policy',
'no-user-gesture-required'
)

// 当所有窗口被关闭了,退出。
electronApp.on('window-all-closed', () => {
Expand Down Expand Up @@ -272,6 +276,15 @@ const windowControl = {
Util.takeScreenshot(browserWindow.webContents)
}
}),
new MenuItem({
label: '截图',
accelerator: 'CmdOrCtrl+PrintScreen',
enabled: true,
visible: false,
click: (menuItem, browserWindow) => {
Util.takeScreenshot(browserWindow.webContents)
}
}),
new MenuItem({
label: '退出游戏',
accelerator: 'Alt+F4',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "majsoul-plus-client",
"version": "1.7.4",
"version": "1.7.5",
"productName": "Majsoul Plus",
"author": "MajsoulPlus Team",
"description": "Majsoul Plus",
Expand Down

0 comments on commit 322224d

Please sign in to comment.