Fixed an issue with the custom titlebar

This commit is contained in:
KayoticCarnige 2022-07-14 17:34:16 -04:00
parent 33b2b05792
commit fbca68d8b5
2 changed files with 7 additions and 7 deletions

View file

@ -5,11 +5,6 @@ import * as path from "path";
import os from "os"; import os from "os";
export function injectTitlebar() { export function injectTitlebar() {
document.addEventListener("DOMContentLoaded", function (event) { document.addEventListener("DOMContentLoaded", function (event) {
if (window.armcord.channel == "hummus") {
window.alert(
"ArmCord Titlebar doesn't currently work well in Hummus, please change ArmCord style to native for better experience."
);
}
var elem = document.createElement("div"); var elem = document.createElement("div");
elem.innerHTML = `<nav class="titlebar"> elem.innerHTML = `<nav class="titlebar">
<div class="window-title" id="window-title"></div> <div class="window-title" id="window-title"></div>

View file

@ -52,10 +52,15 @@ export function setup() {
}); });
} }
export function getVersion() {
//I'm too lazy to replace every mf reference so :p //I'm too lazy to replace every mf reference so :p
export function getVersion() {
//Checks if the version # has 4 sections (3.1.0.0) instead of 3 (3.1.0) / Shitty way to check if Kernel Mod is installed
if ((('').split(app.getVersion()).length > 3) == true) {
return app.getVersion().split('.')[0] + "." + app.getVersion().split('.')[1] + "." + app.getVersion().split('.')[2] + " [Kernel Mod]";
} else {
return app.getVersion(); return app.getVersion();
} }}
export async function injectJS(inject: string) { export async function injectJS(inject: string) {
const js = await (await fetch(`${inject}`)).text(); const js = await (await fetch(`${inject}`)).text();