armcord/preload.js

20 lines
596 B
JavaScript
Raw Normal View History

2021-05-01 12:41:12 +00:00
const customTitlebar = require('custom-electron-titlebar')
2021-05-04 10:08:30 +00:00
const electronLocalshortcut = require("electron-localshortcut");
const { remote } = require("electron");
2021-05-01 12:41:12 +00:00
window.addEventListener('DOMContentLoaded', () => {
new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex("#2C2F33"),
});
})
2021-05-04 10:08:30 +00:00
const currentWindow = remote.getCurrentWindow();
electronLocalshortcut.register(currentWindow, "F5", () => {
location.reload();
});
2021-05-04 10:11:42 +00:00
electronLocalshortcut.register(currentWindow, "F12", () => {
currentWindow.webContents.openDevTools();
});
2021-05-02 21:16:21 +00:00
require("./utils/capturer.js")