visua0 / Melvor-Idle-Combat-Simulator-Reloaded

A browser extension for the game Melvor Idle
GNU General Public License v3.0
54 stars 23 forks source link

fails to load in non-English Melvor #78

Closed gmiclotte closed 2 years ago

gmiclotte commented 2 years ago

Hello there ! Just want to report a bug with Melvor Idle Combat Simulator Reloaded (https://github.com/visua0/Melvor-Idle-Combat-Simulator-Reloaded). This mod still not work with current version 1.0?1361 ...

On Chrome console :

MICSR.js:27 MICSR: Melvor Idle Combat Simulator Reloaded v1.6.0 was not loaded due to the following error: MICSR.js:28 MICSR: TypeError: Cannot read properties of null (reading 'after') at Object.MICSR.addMenuItem (Menu.js:135) at new MICSR.App (App.js:317) at onMessage (main.js:50)

Suggested fix : On Menu.js:135, line document.getElementById(menuID).after(tabDiv);, var menuID is set with "mcsToolsMenu". However, the true ID of the menu is "nav-menu-show". Changing it will correctly load the mod.

It seems Melvor Idle Combat Simulator Reloaded works with language set to English. Maybe the div mcsToolsMenu exists only in english ? (That's possible - we don't have changelog with French version of the game for example)

gmiclotte commented 2 years ago

Thanks I'll look into it, it probably just fails to create the mcsToolsMenu in an earlier stage

gmiclotte commented 2 years ago

fixed in v1.6.1