MCPcopy Create free account
hub / github.com/Revadike/Misc-JavaScript-Projects / observeDIM

Function observeDIM

DIM - Auto Ghost Switcher.user.js:142–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140 }
141
142 function observeDIM() {
143 var observer = new MutationObserver((records) => {
144 for (var record of records) {
145 for (var node of record.removedNodes) {
146 if (node.classList && node.classList.contains("exit-done")) {
147 initGhostSwitcher();
148 return;
149 }
150 }
151 }
152 });
153
154 observer.observe(document.getElementById('app'), { childList: true, subtree: true });
155 }
156
157 observeDIM();
158})();

Calls 1

initGhostSwitcherFunction · 0.85

Tested by

no test coverage detected