Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 20e60fe

Browse files
committed
Support windows mouse forward button
1 parent a077fc8 commit 20e60fe

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

app/main.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,19 @@ function openMainWindow() {
7272
});
7373

7474
mainWindow.on('app-command', function (e, cmd) {
75-
if (cmd === 'browser-backward' && mainWindow.webContents.canGoBack()) {
76-
mainWindow.webContents.goBack();
75+
switch (cmd) {
76+
case 'browser-backward':
77+
if (mainWindow.webContents.canGoBack()) {
78+
mainWindow.webContents.goBack();
79+
}
80+
break;
81+
case 'browser-forward':
82+
if (mainWindow.webContents.canGoForward()) {
83+
mainWindow.webContents.goForward();
84+
}
85+
break;
86+
default:
87+
break;
7788
}
7889
});
7990

0 commit comments

Comments
 (0)