From 3a77b0067b7a3d8f711660512b15adebcaab14d6 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Tue, 4 May 2021 12:08:30 +0200 Subject: [PATCH] Add F5 to reload --- preload.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/preload.js b/preload.js index 6638e87..4842353 100644 --- a/preload.js +++ b/preload.js @@ -1,10 +1,18 @@ const customTitlebar = require('custom-electron-titlebar') +const electronLocalshortcut = require("electron-localshortcut"); +const { remote } = require("electron"); window.addEventListener('DOMContentLoaded', () => { new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex("#2C2F33"), + unfocusEffect: true, + menu: true, }); }) +const currentWindow = remote.getCurrentWindow(); +electronLocalshortcut.register(currentWindow, "F5", () => { + location.reload(); +}); require("./utils/capturer.js")