Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Commit

Permalink
Remove unneeded if
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt committed Nov 5, 2016
1 parent da10b46 commit a17c239
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions app/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ try {
var remote = require('electron').remote;
var globalShortcut = remote.globalShortcut;
let keyRegisterFn = (...args) => globalShortcut.register(...args);
if (process.platform === 'win32') {
const hook = require('ll-keyboard-hook-win');

keyRegisterFn = (key, fn) => {
hook.on('down', key, fn);
};
}
const hook = require('ll-keyboard-hook-win');

keyRegisterFn('MediaPlayPause', function() {
keyRegisterFn = (key, fn) => {
hook.on('down', key, fn);
};

keyRegisterFn('MediaPlayPause', () => {
playPause();
});

Expand Down

0 comments on commit a17c239

Please sign in to comment.