minj / foxtrick

FoxTrick is a browser extension for the Hattrick online football manager game, currently available for Firefox, Google Chrome, as well as for Opera.
https://www.foxtrick.org
GNU General Public License v3.0
71 stars 49 forks source link

MyMonitor: doesn't support showing NT/U21 last/next match #1712

Open dominiquelee opened 1 year ago

dominiquelee commented 1 year ago

MyMonitor cannot display matches for NT and U21 teams: image

See https://github.com/minj/foxtrick/blob/c134de0234124520370c4eb16032f798ee92dc64/content/information-aggregation/my-monitor.js#L535-L540

NT matches should most likely be retrieved from nationalteammatches (which does not take a teamId parameter, only whether we want NT or U21 matches) and filtered from there. Ideally, only one call is made even if multiple NT teams are tracked in MyMonitor (and no call at all if there is none). Please note that team.type in this function is currently equal to nt for both NT and U21 teams, so extra parsing is needed.

minj commented 1 year ago

Sure, feel free to submit a PR

murko69 commented 1 year ago

Side note for anyone feeling up to fix that NT-issue.

There is a counter on the team page telling how many teams are added to MyMonitor 1-monitor-team

I'd like that also on the MyMonitor page itself at the top somewhere like: 2-monitor-main