DinoDevs / GladiatusCrazyAddon

This was "A browser addon for the Gladiatus browser game."
https://gladiatus.dinodevs.com
GNU General Public License v3.0
41 stars 32 forks source link

Turn off Arena / Circus Turma notification #338

Open FrutyX opened 2 years ago

FrutyX commented 2 years ago

You see this, right there?

not

Give us the ability to turn it off, for example, I never really cared about Turma reports, so why I should get these notifications?

It could be added to the Arena settings like:

Then again, I wasn't digging in it (yet), I don't know if it's possible to turn it off only for Arena/CT, if not, and it would be difficult, just add one setting to turn it off completely (yes, both), rather than not adding it at all.

Thank you.

FrutyX commented 2 years ago

When a report comes, a new class is added to it: class="menue_reports_highlight" together with a div: <div class="menue_new_count">1</div> that is counting the number of received reports.

GramThanos commented 2 years ago

You can understand what was the last notification from the url on the button:

But if the counter shows more than 1, you don't know if all of them are sourced from that particular page.

FrutyX commented 2 years ago

URL, that's true.

I think this will need someone more experienced, simple stuff like:

document.querySelector("#menue_reports").classList.replace('menue_reports_highlight', 'menue_reports');

seems to work (doesn't remove the counter), but it's just an example how it could work (and only for both).

GramThanos commented 2 years ago

I think it is faster with CSS

.ihatearenareports #menue_reports .menue_reports_highlight[href*="&t=2&"] {
    ...
}

Then javascript will only have to include the ihatearenareports on html (through the preload function on global.js.

GreatApo commented 2 years ago

You can understand what was the last notification from the url on the button:

  • Arena: https://s4-gr.gladiatus.gameforge.com/game/index.php?mod=reports&t=2&...
  • Turma: https://s4-gr.gladiatus.gameforge.com/game/index.php?mod=reports&t=3&...

But if the counter shows more than 1, you don't know if all of them are sourced from that particular page.

I think the only way this can be properly implemented is by turning off the notification and requesting the turma reports page (so that the notifications don't pile up)