MCPcopy Create free account
hub / github.com/Chainlit/cookbook / mutationObserverCallback

Function mutationObserverCallback

auth/public/script.js:13–19  ·  view source on GitHub ↗
(mutationsList, observer)

Source from the content-addressed store, hash-verified

11}
12
13function mutationObserverCallback(mutationsList, observer) {
14 var buttons = document.querySelectorAll('button');
15 if (buttons.length === 1) {
16 changeLoginButtonText(buttons);
17 observer.disconnect();
18 }
19}
20
21if (window.location.href.includes('login')) {
22 const observer = new MutationObserver(mutationObserverCallback);

Callers

nothing calls this directly

Calls 2

changeLoginButtonTextFunction · 0.85
disconnectMethod · 0.45

Tested by

no test coverage detected