You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

31 lines
883 B

const customTitlebar = require("custom-electron-titlebar");
const { Menu } = require("electron");
const $ = require("./javascripts/jquery.min.js");
var titleBar = new customTitlebar.Titlebar({
menu: null,
backgroundColor: customTitlebar.Color.fromHex("#292929"),
icon: "icon/icon.png",
});
function init() {
document.querySelectorAll(".nav-item").forEach((x) => {
x.addEventListener("click", () => {
if ($("#main-page").prop("src").indexOf(x.id) < 0) {
$("#main-page").prop("src", `pages/${x.id}.html`);
document.querySelectorAll(".nav-item").forEach((y) => {
y.classList.remove("active");
});
x.classList.add("active");
}
});
});
document.querySelectorAll(".nav-item")[0].classList.add("active");
}
document.onreadystatechange = function () {
if (document.readyState == "complete") {
init();
}
};