mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01:00
Fix chat scrolling with Dark Reader extension
This commit is contained in:
parent
b2296dcda0
commit
0986868b1b
@ -73,7 +73,8 @@ const targetElement = document.getElementById('chat').parentNode.parentNode.pare
|
|||||||
// Create a MutationObserver instance
|
// Create a MutationObserver instance
|
||||||
const observer = new MutationObserver(function(mutations) {
|
const observer = new MutationObserver(function(mutations) {
|
||||||
mutations.forEach(function(mutation) {
|
mutations.forEach(function(mutation) {
|
||||||
let childElement = targetElement.childNodes[2].childNodes[0].childNodes[1];
|
let nodes = targetElement.childNodes[2].childNodes[0].childNodes;
|
||||||
|
let childElement = nodes[nodes.length - 1];
|
||||||
childElement.scrollTop = childElement.scrollHeight;
|
childElement.scrollTop = childElement.scrollHeight;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user