Skip to content

Commit 7d6360d

Browse files
committed
Add new bind: reload page (F5)
1 parent bbd60bc commit 7d6360d

5 files changed

Lines changed: 18 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ or simply run `start.vbs`.
3030
* **mouse4** - Go back
3131
* **mouse5** - Go forward
3232
* **Ctrl + Space** - Start/Stop music _(It also works, when the main window is minimized!)_
33+
* **F5** - Reload page

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "FireSong",
3-
"version": "1.0.0",
4-
"description": "FireSong written by David Csizmadia and Milan Szekely",
3+
"version": "1.0.1",
4+
"description": "FireSong has written by David Csizmadia and Milan Szekely.",
55
"main": "src/main.js",
66
"scripts": {
77
"postinstall": "electron-rebuild",

src/iohook.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Code forked from iohook
3+
* Edited version (for FireSong)
4+
*/
15
'use strict';
26
const EventEmitter = require('events');
37
const path = require('path');

src/main.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Copyright © 2018.
3+
* FireSong is the work of David Csizmadia <firemax12b@gmail.com>, Milan Szekely <szekelymilan1125@gmail.com>
4+
*/
15
'use strict';
26

37
const {app, BrowserWindow, globalShortcut} = require('electron');
@@ -39,10 +43,14 @@ app.on('ready', () => {
3943
return win.webContents.goForward();
4044
});
4145

42-
// Start / Stop video with bindings
43-
const binding = ioHook.registerShortcut([29, 57], (keys) => { // Bind Ctrl + Space
46+
// Keybindings
47+
const startStop = ioHook.registerShortcut([29, 57], (keys) => { // Bind Ctrl + Space
4448
sendInput('\u004B'); // Send 'K' key for YouTube
4549
});
50+
51+
const reloadPage = ioHook.registerShortcut([63], (keys) => { // Bind F5
52+
win.webContents.reloadIgnoringCache(); // Reload page
53+
});
4654

4755
ioHook.start();
4856
});

0 commit comments

Comments
 (0)