Skip to content

Instantly share code, notes, and snippets.

@brennandunn
Last active June 5, 2024 11:28
Show Gist options
  • Save brennandunn/d73141fe366cfab994aeda1477daa80c to your computer and use it in GitHub Desktop.
Save brennandunn/d73141fe366cfab994aeda1477daa80c to your computer and use it in GitHub Desktop.
$.ajax('https://ipapi.co/json/')
.then(
function success(response) {
window.geolocation = response;
loadRM();
},
function fail(data, status) {
loadRM();
}
);
function loadRM() {
// insert your RightMessage script here!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment