From 2517ea9c9e661f7b808380ecdac2540f140017c7 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 19 Jun 2025 15:23:06 -0700 Subject: [PATCH] Lint --- js/global_scope_js.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/js/global_scope_js.js b/js/global_scope_js.js index eff91156..ebed1f3d 100644 --- a/js/global_scope_js.js +++ b/js/global_scope_js.js @@ -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"] });