mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Fix conflicts
This commit is contained in:
parent
472a46f0a8
commit
c91f85fd8f
2 changed files with 49 additions and 29 deletions
65
preload.js
65
preload.js
|
@ -1,39 +1,32 @@
|
|||
const customTitlebar = require('custom-electron-titlebar')
|
||||
const customTitlebar = require("custom-electron-titlebar");
|
||||
const electronLocalshortcut = require("electron-localshortcut");
|
||||
const { remote } = require("electron");
|
||||
const ArmCord = require("./utils/ArmCord.js");
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
new customTitlebar.Titlebar({
|
||||
backgroundColor: customTitlebar.Color.fromHex("#202225"),
|
||||
menu: false,
|
||||
});
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
const currentWindow = remote.getCurrentWindow();
|
||||
electronLocalshortcut.register(currentWindow, "F5", () => {
|
||||
location.reload();
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F12", () => {
|
||||
currentWindow.webContents.openDevTools();
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F1", () => {
|
||||
require("shell").openExternal("https://support.discord.com/");
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F2", () => {
|
||||
window.location.href = "https://discord.com/invite/F25bc4RYDt";
|
||||
});
|
||||
require("./utils/capturer.js");
|
||||
|
||||
|
||||
const currentWindow = remote.getCurrentWindow();
|
||||
electronLocalshortcut.register(currentWindow, "F5", () => {
|
||||
location.reload();
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F12", () => {
|
||||
currentWindow.webContents.openDevTools();
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F1", () => {
|
||||
require("shell").openExternal("https://support.discord.com/");
|
||||
});
|
||||
electronLocalshortcut.register(currentWindow, "F2", () => {
|
||||
window.location.href = "https://discord.com/invite/F25bc4RYDt";
|
||||
});
|
||||
require("./utils/capturer.js")
|
||||
addStyle(`
|
||||
ArmCord.addStyle(`
|
||||
@import url("https://kckarnige.github.io/femboi_owo/discord-font.css");
|
||||
|
||||
:root {
|
||||
--window-buttons: var(--header-secondary);
|
||||
--cord-color: var(--header-primary);
|
||||
|
@ -76,13 +69,27 @@ div.menubar[role="menubar"] {
|
|||
transform: translate(10px, 2px) !important;
|
||||
}
|
||||
|
||||
background: #202225 !important;
|
||||
.titlebar {
|
||||
background: var(--background-tertiary) !important;
|
||||
font-family: Verdana, Geneva, Tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.titlebar .window-controls-container .window-icon {
|
||||
background: var(--window-buttons) !important;
|
||||
}
|
||||
`);
|
||||
})
|
||||
|
||||
ArmCord.addStyle(
|
||||
`.info-1VyQPT:last-child:before {
|
||||
content: "ArmCord Version: ` +
|
||||
ArmCord.Version +
|
||||
`";
|
||||
height: auto;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
text-transform: none;
|
||||
}`
|
||||
);
|
||||
});
|
||||
|
|
13
utils/ArmCord.js
Normal file
13
utils/ArmCord.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
exports.Version = "2.4";
|
||||
|
||||
exports.addStyle = function (styleString) {
|
||||
const style = document.createElement("style");
|
||||
style.textContent = styleString;
|
||||
document.head.append(style);
|
||||
};
|
||||
|
||||
exports.addScript = function (scriptString) {
|
||||
var script = document.createElement("script");
|
||||
script.textContent = scriptString;
|
||||
document.body.append(script);
|
||||
};
|
Loading…
Reference in a new issue