-
Notifications
You must be signed in to change notification settings - Fork 7
Enhance Hattrick Portal links #17
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
Enhance Hattrick Portal links #17
Conversation
- Updated link from player page to point to that player page in Portal (this works even if the user does not own the player) - Added link to Hattrick's `Players` page (only for the current user team) to Portal's `Your players` page
|
There is a blocking issue for updates to links.json: #14 Once I have resolved that I will merge this PR and also your update to the French tracker that you submitted on minij's repo. |
|
Hattrick Portal migrated to https://hattrickportal.online this week. |
The old URL is now no longer working.
unnecessarydave
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filters will only work with an associated filter range, e.g "teamidrange: [[1,100]]". The code in the suggestions should do what you intended, I think.
I appreciate you weren't able to test this, and there's no documentation that I could find for the format of links.json. I'll comment on the PR with some info on how I test links changes.
|
Ok, so it is possible to test links changes, even though Foxtrick pulls links.json fron the CDN rather than the module data files. The key is to 'test in place' rather than doing a build. On chrome, you can simply 'load unpacked' from the extension manager and point it at the folder where you have your PR branch checked out. You need to click the little reload icon in the extension manager after any code changes. On Firefox, you' need Mozilla's web-ext command line tool installed, and then 'web-ext run' from the folder where you have your PR branch checked out. The extension reloads automatically after any code changes (ususally). In both cases, the branch is set to 'dev' and there's a conditional statement that checks for this and loads all CDN content locally rather than from the web. |
|
Thanks for the review! I'm not that interested in setting up a local dev environment for now, so feel free to apply the changes by yourself. 😛 (and unrelated, very happy to see the PR to switch the CDN location!) |
An unintended side effect of this is that the MyMonitor sideBox will appear on the Players page for NT/U21 teams.
|
Note for Dave of the Future: Moving the NT players page to the 'national' category is a bit of a hack to get the tracker icon to have the National flag. Code like the following in links-players.js would be more correct, but you won't get the flag that way. |
Reverts changes made by pr foxtrick-ng#17
Playerspage (only for the current user team) to Portal'sYour playerspagePlease note that:
playerslinkdoes not yet appear in this file (but is referenced in links-players.js), and theownteamidhas very limited examples in this file,