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({
|
2021-05-04 15:38:20 +00:00
|
|
|
backgroundColor: customTitlebar.Color.fromHex("#202225"),
|
2021-05-05 08:16:24 +00:00
|
|
|
menu: false,
|
2021-05-01 12:41:12 +00:00
|
|
|
});
|
|
|
|
|
2021-05-04 15:38:20 +00:00
|
|
|
/**
|
|
|
|
* Utility function to add CSS in multiple passes.
|
|
|
|
* @param {string} styleString
|
|
|
|
*/
|
|
|
|
function addStyle(styleString) {
|
|
|
|
const style = document.createElement('style');
|
|
|
|
style.textContent = styleString;
|
|
|
|
document.head.append(style);
|
|
|
|
}
|
2021-05-01 12:41:12 +00:00
|
|
|
|
|
|
|
|
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")
|
2021-05-04 15:38:20 +00:00
|
|
|
addStyle(`
|
|
|
|
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
|
|
|
|
|
|
|
|
.base-3dtUhz, .sidebar-2K8pFh {
|
|
|
|
display: -webkit-box;
|
|
|
|
display: -ms-flexbox;
|
|
|
|
display: flex;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
-webkit-box-direction: normal;
|
|
|
|
-ms-flex-direction: column;
|
|
|
|
overflow: hidden;
|
|
|
|
border-top-left-radius: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.menubar[role="menubar"] {
|
|
|
|
width: 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.window-title:after {
|
|
|
|
content: "Cord";
|
|
|
|
color: #fff;
|
|
|
|
font-weight: normal;
|
2021-05-05 03:36:28 +00:00
|
|
|
font-size: 14px;
|
2021-05-04 15:38:20 +00:00
|
|
|
font-family: Discordinated;
|
|
|
|
}
|
|
|
|
|
|
|
|
.window-title:before {
|
|
|
|
content: "ARM";
|
|
|
|
color: #7289da;
|
|
|
|
font-weight: normal;
|
2021-05-05 03:36:28 +00:00
|
|
|
font-size: 14px;
|
2021-05-04 15:38:20 +00:00
|
|
|
font-family: Helvetica, sans-serif;
|
|
|
|
}
|
|
|
|
|
|
|
|
.window-title {
|
|
|
|
font-size: 0px !important;
|
|
|
|
margin-left: initial !important;
|
2021-05-05 03:36:28 +00:00
|
|
|
transform: translate(10px, 2px) !important;
|
2021-05-04 15:38:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.titlebar {
|
|
|
|
background: #202225 !important;
|
|
|
|
}
|
|
|
|
`);
|
2021-05-04 15:44:45 +00:00
|
|
|
})
|
|
|
|
|