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.

Revisions

  1. brennandunn revised this gist Dec 1, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion geolocation-ip.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    $.ajax('https://ipapi.co/json/')
    .then(
    function success(response) {
    window.location = response;
    window.geolocation = response;
    loadRM();
    },

  2. brennandunn created this gist Oct 27, 2020.
    15 changes: 15 additions & 0 deletions geolocation-ip.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    $.ajax('https://ipapi.co/json/')
    .then(
    function success(response) {
    window.location = response;
    loadRM();
    },

    function fail(data, status) {
    loadRM();
    }
    );

    function loadRM() {
    // insert your RightMessage script here!
    }