mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
sidebar is react, fix a few bugs
This commit is contained in:
@@ -56,6 +56,7 @@ export const MainMenuLinks: IMainMenuLinks = {
|
||||
};
|
||||
|
||||
export function initializeMainMenuLinks(): boolean {
|
||||
return true;
|
||||
try {
|
||||
function safeGetLink(id: string): HTMLElement {
|
||||
const elem: HTMLElement | null = clearEventListeners(id);
|
||||
@@ -84,9 +85,9 @@ export function initializeMainMenuLinks(): boolean {
|
||||
MainMenuLinks.Gang = safeGetLink("gang-menu-link");
|
||||
MainMenuLinks.Milestones = safeGetLink("milestones-menu-link");
|
||||
MainMenuLinks.Tutorial = safeGetLink("tutorial-menu-link");
|
||||
const op: HTMLElement | null = document.getElementById("options-menu-link");
|
||||
if (op === null) throw new Error(`Could not find element with id: "options-menu-link"`);
|
||||
MainMenuLinks.Options = op; // This click listener is already set, so don't clear it
|
||||
// const op: HTMLElement | null = document.getElementById("options-menu-link");
|
||||
// if (op === null) throw new Error(`Could not find element with id: "options-menu-link"`);
|
||||
// MainMenuLinks.Options = op; // This click listener is already set, so don't clear it
|
||||
MainMenuLinks.DevMenu = safeGetLink("dev-menu-link");
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user