const looopMarket = localStorage.getItem('looopMarket'); function getIPAddress() { fetch(`https://freeipapi.com/api/json`) .then(response => response.json()) .then(data => { const country = data.countryCode if (country == '') { throw new Error('Error fetching geolocation data'); } else if (country == 'KR') { korea(); } else if (country == 'CA') { canada(); } }) .catch(error => { console.error('Error:', error); }); } function korea() { var instagramLink = document.querySelector('[social="Instagram"]'); if (instagramLink) { instagramLink.href = 'https://www.instagram.com/innofoods_korea'; } } function canada() { if (looopMarket !== 'CA') { const countryPopup = document.querySelector('[country="popup"]'); const getmarkets = document.querySelector('[looop="markets"]'); if (countryPopup) { setTimeout(() => { // Get the element you want to simulate a click on var element = getmarkets; // Create a new 'click' event var event = new MouseEvent('click', { bubbles: true, cancelable: true, view: window }); // Dispatch the event on the element element.dispatchEvent(event); }, 4000); } else { console.log("Cant find country selector"); } } } // Start the process getIPAddress(); Not Found

Error 404

This object could not be viewed

You are not authorized to view this object

This object does not exist or is not publicly accessible at this URL. Check the URL of the object that you're looking for or contact the owner to enable Public access.

Learn how to enable Public Access