Open FrutyX opened 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.
You can understand what was the last notification from the url on the button:
https://s4-gr.gladiatus.gameforge.com/game/index.php?mod=reports&t=2&...
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.
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).
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
.
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)
You see this, right there?
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.