Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off Arena / Circus Turma notification #338

Open
FrutyX opened this issue Jan 7, 2022 · 5 comments
Open

Turn off Arena / Circus Turma notification #338

FrutyX opened this issue Jan 7, 2022 · 5 comments

Comments

@FrutyX
Copy link
Collaborator

FrutyX commented Jan 7, 2022

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:

  • Disable Arena notifications
  • Disable Circus Turma notifications

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
Copy link
Collaborator Author

FrutyX commented Jan 7, 2022

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
Copy link
Member

GramThanos commented Jan 7, 2022

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.

@FrutyX
Copy link
Collaborator Author

FrutyX commented Jan 7, 2022

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
Copy link
Member

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
Copy link
Member

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants