mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Fixed an issue with the custom titlebar
This commit is contained in:
parent
33b2b05792
commit
fbca68d8b5
2 changed files with 7 additions and 7 deletions
|
@ -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>
|
||||
|
|
|
@ -52,10 +52,15 @@ export function setup() {
|
|||
});
|
||||
}
|
||||
|
||||
export function getVersion() {
|
||||
|
||||
//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();
|
||||
}
|
||||
}}
|
||||
export async function injectJS(inject: string) {
|
||||
const js = await (await fetch(`${inject}`)).text();
|
||||
|
||||
|
|
Loading…
Reference in a new issue