JavaScript
Use Orbe's variables and functions for your custom localization needs
Last updated
Was this helpful?
Was this helpful?
var myCustomVar = '';
setTimeout(() => {
orbito.getRemoteCountryCode().then((value) => {
myCustomVar = value;
if (myCustomVar === 'GB') {
console.log("User is in the UK");
}
});
}, 1000);setTimeout(() => {
orbito.getRemoteCountryCode().then((value) => {
if (value === 'GB') {
document.querySelector('.delivery-message').innerHTML = '2-hour delivery';
} else if (value === 'US') {
document.querySelector('.delivery-message').innerHTML = '1-day delivery';
}
});
}, 1000);