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";
export function injectTitlebar() {
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");
elem.innerHTML = `<nav class="titlebar">
<div class="window-title" id="window-title"></div>

View File

@ -52,10 +52,15 @@ export function setup() {
});
}
//I'm too lazy to replace every mf reference so :p
export function getVersion() {
//I'm too lazy to replace every mf reference so :p
//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();
}
}}
export async function injectJS(inject: string) {
const js = await (await fetch(`${inject}`)).text();