| 9254 | }); | 9254 | }); |
| 9255 | const chatElementScroll = document.getElementById('chat'); | 9255 | const chatElementScroll = document.getElementById('chat'); |
| 9256 | const chatScrollHandler = function () { | 9256 | const chatScrollHandler = function () { |
| | 9257 | if (power_user.waifuMode) { |
| | 9258 | scrollLock = true; |
| | 9259 | return; |
| | 9260 | } |
| | 9261 | |
| 9257 | const scrollIsAtBottom = Math.abs(chatElementScroll.scrollHeight - chatElementScroll.clientHeight - chatElementScroll.scrollTop) < 1; | 9262 | const scrollIsAtBottom = Math.abs(chatElementScroll.scrollHeight - chatElementScroll.clientHeight - chatElementScroll.scrollTop) < 1; |
| 9258 | | 9263 | |
| 9259 | // Cancel autoscroll if the user scrolls up | 9264 | // Cancel autoscroll if the user scrolls up |