= 3) { clearInterval(intervalId); } var elem = document.getElementById('translationHydrationTest'); if(!elem){ clearInterval(intervalId); return; } var text = elem.innerText; if(text !== "Whatever You Need, We've Got It"){ var expiryDate = new Date(); expiryDate.setMonth(expiryDate.getMonth() + 2) document.cookie = 'nossr=y; Path=/; Expires=' + expiryDate +';'; // Create the modal overlay var modalOverlay = document.createElement('div'); modalOverlay.className = 'temp-modal-overlay'; // Create the modal var modal = document.createElement('div'); modal.className = 'temp-modal'; modal.textContent = "We detected a translation service therefore we're reloading the page to give you a better experience."; // Append the modal and overlay to the body document.body.appendChild(modalOverlay); document.body.appendChild(modal); setTimeout(function(){ document.location.reload(); },5000) clearInterval(intervalId); } counter++; },500) } }catch(e){ console.error(e) } }());