add f5f8 to electron

This commit is contained in:
Olivier Gagnon 2021-09-21 13:29:16 -04:00
parent 1b26d25a53
commit c564de40b3
2 changed files with 8 additions and 3 deletions

@ -1,4 +1,5 @@
const { app, BrowserWindow, Menu } = require("electron"); const { app, BrowserWindow, Menu, globalShortcut } = require("electron");
Menu.setApplicationMenu(false); Menu.setApplicationMenu(false);
function createWindow() { function createWindow() {
const win = new BrowserWindow({ const win = new BrowserWindow({
@ -13,6 +14,12 @@ function createWindow() {
win.loadFile("index.html"); win.loadFile("index.html");
win.show(); win.show();
// win.webContents.openDevTools(); // win.webContents.openDevTools();
globalShortcut.register("f5", function () {
win.loadFile("index.html");
});
globalShortcut.register("f8", function () {
win.loadFile("index.html", { query: { noScripts: "true" } });
});
} }
app.whenReady().then(() => { app.whenReady().then(() => {

@ -163,8 +163,6 @@ export function refreshTheme() {
backgroundColor: "#333", backgroundColor: "#333",
border: "1px solid " + colors.well, border: "1px solid " + colors.well,
// color: colors.primary, // color: colors.primary,
margin: "5px",
padding: "3px 5px",
"&:hover": { "&:hover": {
backgroundColor: colors.black, backgroundColor: colors.black,
}, },