Ishadijcks / MooLite

Open source Milky Way Idle client
11 stars 4 forks source link

MooLite bar does not appear when MWI is opened in a new tab. #71

Open aidanczyryca opened 1 year ago

aidanczyryca commented 1 year ago

Describe the bug When opening MWI in a new tab, the MooLite bar does not appear if you wait too long to switch to that tab. MooLite is likely still running because the empty white space can still appear and Tampermonkey says that it is active. It seems that the script does not correctly run if the game has already been loaded.

To Reproduce Steps to reproduce the behavior:

  1. Open "https://www.milkywayidle.com/game" in a new tab.
  2. Switch to tab after it loads.
  3. See error.

Expected behavior Expect to see MooLite bar appear.

Screenshots chrome 2 firefox 2

Browser Chrome Version 113.0.5672.64 (Official Build) (64-bit) Firefox 112.0.2 (64-bit)

Additional context Other browser extensions do not seem to affect this bug. No other Tampermonkey scripts are installed or active.

Ishadijcks commented 1 year ago

Interesting.

MooLite requires to read the first incoming server message to properly initialise. It's where it gets all the game information. I'm guessing the tampermonkey script is loading too late when opening in a new tab, after that message has already happened.

I'll look into it