-
-
Notifications
You must be signed in to change notification settings - Fork 94
Conversation
@CanadaHonk
CanadaHonk
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.
Thanks for the PR! Needs some changes before it can be merged.
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.
Hard-coded class names break easily which is why we need to clone existing elements.
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.
I am pretty sure this will be slower than the interval because it will run on every body change which is much more frequent than 800ms
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.
Having these be || instead of ifs is overcomplicated and serves no benefit?
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.
Don't duplicate querySelector calls, it could change between calls to cause a race condition and is also not great for performance
Changes :
Replaces setInterval(800 ms) with MutationObserver for parameter injection.
No reference to mods but avoids conflicts with them.
Uses Discord's native "text-xxs/normal_cf4812" class and native "color:var(text-muted)" inline style for consistent styling.
Clicks :
Menu item → Opens the OpenAsar window
Version information → Opens the official website https://openasar.dev/
Plus :
Using the ${{ github.repository }} variable in the workflow to allow forks to create releases.