mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-01 19:06:42 +02:00
Optimize classList.remove()
This commit is contained in:
@@ -3485,8 +3485,7 @@ class Toast {
|
||||
}
|
||||
|
||||
const classList = Toast.#$wrapper.classList;
|
||||
classList.remove('bx-offscreen');
|
||||
classList.remove('bx-hide');
|
||||
classList.remove('bx-offscreen', 'bx-hide');
|
||||
classList.add('bx-show');
|
||||
}
|
||||
|
||||
@@ -3506,8 +3505,7 @@ class Toast {
|
||||
Toast.#$wrapper.addEventListener('transitionend', e => {
|
||||
const classList = Toast.#$wrapper.classList;
|
||||
if (classList.contains('bx-hide')) {
|
||||
classList.remove('bx-show');
|
||||
classList.remove('bx-hide');
|
||||
classList.remove('bx-offscreen', 'bx-hide');
|
||||
classList.add('bx-offscreen');
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user