Initial commit - app + 4 plugins

This commit is contained in:
TC
2019-04-19 20:12:36 +02:00
commit 8787b5c175
31 changed files with 7878 additions and 0 deletions

View File

@ -0,0 +1,23 @@
const { listenAction } = require("../utils");
const { ACTIONS, CHANNEL } = require("./actions.js");
function handle(win) {
listenAction(CHANNEL, (event, action) => {
switch (action) {
case ACTIONS.NEXT:
if (win.webContents.canGoForward()) {
win.webContents.goForward();
}
break;
case ACTIONS.BACK:
if (win.webContents.canGoBack()) {
win.webContents.goBack();
}
break;
default:
console.log("Unknown action: " + action);
}
});
}
module.exports = handle;