1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
This commit is contained in:
zumbiepig
2024-09-04 14:11:07 -07:00
parent 4e5fc6203e
commit 54f2d6a7a9
3 changed files with 79 additions and 81 deletions

View File

@@ -152,6 +152,17 @@ const navigate = {
},
};
const article = {
open: function (articleId: string) {
const modal = document.querySelector(`#article-${articleId}`) as HTMLElement | null;
if (modal) modal.style.display = 'flex';
},
close: function () {
const modals = document.querySelectorAll(`.article`);
modals.forEach((modal) => ((modal as HTMLElement).style.display = 'none'));
},
};
/*const cookie = {
set: function (key: string, value: string | number | object | [] | boolean | null | undefined, days: number) {
let maxAge;
@@ -584,5 +595,5 @@ if (window.location.pathname === '/settings/') {
if (window.location.hostname === null) {
// Stop the minifier from removing these functions
console.debug([navigate, query, versionSelector, game, mods, base64Gzip]);
console.debug([navigate, query, versionSelector, game, mods, base64Gzip, article]);
}