mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-03-10 23:53:49 +01:00
Lint
This commit is contained in:
parent
90f42f311a
commit
2517ea9c9e
|
|
@ -354,22 +354,21 @@ function handleMorphdomUpdate(data) {
|
|||
|
||||
// Wait for Gradio to finish setting its styles, then force dark theme
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
mutations.forEach((mutation) => {
|
||||
if (mutation.type === 'attributes' &&
|
||||
mutation.target.tagName === 'GRADIO-APP' &&
|
||||
mutation.attributeName === 'style') {
|
||||
mutations.forEach((mutation) => {
|
||||
if (mutation.type === "attributes" &&
|
||||
mutation.target.tagName === "GRADIO-APP" &&
|
||||
mutation.attributeName === "style") {
|
||||
|
||||
// Gradio just set its styles, now force dark theme
|
||||
document.body.classList.add('dark');
|
||||
|
||||
observer.disconnect();
|
||||
}
|
||||
});
|
||||
// Gradio just set its styles, now force dark theme
|
||||
document.body.classList.add("dark");
|
||||
observer.disconnect();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Start observing
|
||||
observer.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
subtree: true,
|
||||
attributeFilter: ['style']
|
||||
attributes: true,
|
||||
subtree: true,
|
||||
attributeFilter: ["style"]
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue