fix: secoia intl
This commit is contained in:
		@ -257,7 +257,7 @@ window.orbit.intl = new JsI18n;
 | 
			
		||||
document.addEventListener("DOMContentLoaded", () => {
 | 
			
		||||
  // Detect the lang & initialize, based on the browser or "language" item from localstorage
 | 
			
		||||
  window.orbit.intl.detectLanguage();
 | 
			
		||||
  let timer;
 | 
			
		||||
  let timer, timer2;
 | 
			
		||||
  (new MutationObserver((mutations) => {
 | 
			
		||||
    mutations.forEach(mutation => {
 | 
			
		||||
      if (mutation.target.attributes["data-trans"] != null) {
 | 
			
		||||
@ -267,6 +267,10 @@ document.addEventListener("DOMContentLoaded", () => {
 | 
			
		||||
        clearTimeout(timer);
 | 
			
		||||
        timer = setTimeout(() => window.orbit.intl.processNode(document.querySelector('body')), 500);
 | 
			
		||||
      }
 | 
			
		||||
      // Hotfix for Secoia
 | 
			
		||||
      if (mutation.target.nodeName == "SOLID-DIRECTORY") {
 | 
			
		||||
        if(!timer2) timer2 = setTimeout(() => mutation.target.render(), 500);
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
  }).observe(document.body, {
 | 
			
		||||
    subtree: true,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user