-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(hackthebox): Update selectors, add settings, fix routing logic #10288
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
Open
sirschubert
wants to merge
4
commits into
PreMiD:main
Choose a base branch
from
sirschubert:fix/hackthebox-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b25664a to
52ae821
Compare
cb960e9 to
91a77c1
Compare
Signed-off-by: sirschubert <100043392+sirschubert@users.noreply.github.com>
Bas950
requested changes
Jan 2, 2026
Member
Bas950
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.
Bump version in metadata
and maybe use a Promise.all for the getSetting calls
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR significantly refines the HackTheBox activity to support the website's latest structural changes (SPA routing) and introduces high-efficiency logic for dynamic asset rendering.
Key Changes:
Architectural Overhaul: Replaced the O(n) regex-loop routing with a high-speed switch-based router, reducing processing overhead during DOM updates.
User Identity Integration: Implemented a targeted scraper to display the operative's username
(Username: {name})on the homepage instead of a generic "Homepage" string.Dynamic Asset Scraping:
Added support for Machine Avatars: The presence now dynamically scrapes the Machine's unique avatar URL from the HTB S3 bucket when viewing a specific machine page.
Implemented a specificity-hardened selector (
.avatar-icon-name-details) to prevent accidental scraping of the user's profile picture.Asset Logic: Introduced
smallImageKeysupport for specific sections (Tracks, Fortresses, Challenges, etc.) utilizing a centralized asset map.Routing Logic: Consolidated redundant state-checkers into a single
getBrowsingStatehelper that dynamically reads?tab=query parameters.Settings Integration: Added support for user-configurable toggles for Rank, Global Ranking, and Flags on the Dashboard via
PresenceSettings.Type Safety: Resolved TypeScript union-type conflicts (
PresenceDatavsMediaPresenceData) using explicit type casting for more robust builds.Acknowledgements
npm run lintScreenshots
Proof showing the creation/modification is working as expected