DinoDevs / GladiatusCrazyAddon

This was "A browser addon for the Gladiatus browser game."

Home Page:https://gladiatus.dinodevs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Closing the chat breaks the addon (cookie fail)

FrutyX opened this issue · comments

How to reproduce: You open the chat, and you close it, after closing it the addon will get broken, but thankfully, once you refresh the page, GCA will be back again.

  • Google Chrome v105.0.5195.53
  • GCA v4.3.6
  • Other extensions disabled
overview.js?4.3.6&built=1662039112112:124 Uncaught TypeError: Cannot read properties of null (reading 'substring')
    at Object.updateData (overview.js?4.3.6&built=1662039112112:124:57)
    at Object.inject (overview.js?4.3.6&built=1662039112112:17:8)
    at fireLoad (overview.js?4.3.6&built=1662039112112:1847:16)

gcabug

Conclusion: The URL after closing the chat is https://s51-en.gladiatus.gameforge.com/game/index.php?mod=overview, it does not have an sh=.

Thanos, isn't this an easy fix? For you, I mean.

Basically if GCA detects that are is no sh= you could try to redirect it to a valid URL with sh=, this would work even for everything else, not only the chat (be warned that if you have the chat opened, all pages does not contain an sh=, but the addon still works).

Another approach would be to catch the "substring" null error and redirect you to a valid URL, however I was unable to catch the error, I am kinda too short for these fixes, but from what I saw, it should be a child's play for Thanos.

Ah! Finally someone capable, I was missing you, Apo 😄

Hm, I was testing it before, but today, when I tried it, GCA again broke and:

overview.js?4.3.8&built=1663957221750:138 Failed to detect player's id.

Idea: Without touching the detection, you could modify the href attribute of the close chat icon by it's class chat_icon_disable and when it's clicked, it redirects you to a valid URL link with an sh=.

I was trying it, but in the end, I had some troubles, nothing you wouldn't handle.

Not breaking the addon anymore, thanks to Thanos, closing.