-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
WebUI: Replace Mootools class list manipulation methods #21946
Conversation
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.
Only some minor comments about coding style.
Unfortunately related CI tools couldn't detect such instances...
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
@skomerko |
$("decreaseQueuePosItem").classList.add("invisible"); | ||
$("bottomQueuePosItem").classList.add("invisible"); | ||
$("queueingButtons").classList.add("invisible"); | ||
$("queueingMenuItems").classList.add("invisible"); |
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.
maybe we could also use toggle with force here and get ride of the if/else, example:
$("topQueuePosItem").classList.toggle("invisible", !queueing_enabled);
it means, if queueing_enabled
is true it removes, otherwise it adds.
just a suggestion to reduce a little if/else and code.
All addClass(), removeClass() and hasClass() instances were changed to use classList equivalent:
https://developer.mozilla.org/en-US/docs/Web/API/Element/classList