Use my location to find the closest Service Provider near me
Description
// Force Weglot to refresh AFTER ASL has finished rendering and stopped changing the DOM
document.addEventListener("DOMContentLoaded", function () {
const targetNode = document.querySelector('#asl-list');
if (!targetNode || !window.Weglot) return;
let timeout;
const observer = new MutationObserver(() => {
clearTimeout(timeout);
timeout = setTimeout(() => {
console.log('[Weglot] Debounced refresh after ASL DOM stabilized');
Weglot.refresh();
observer.disconnect(); // stop observing once done
}, 1000); // wait 1s after last change
});
observer.observe(targetNode, { childList: true, subtree: true });
});