ip-geolocation-api-jquery-sdk
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -23,2 +23,3 @@ const _ipgeolocation = function() { | ||
const useragentResponseName = "_ipgeolocation_useragent"; | ||
const ipGeolocationServerStatusName = "_ipgeolocation_server_status"; | ||
@@ -113,2 +114,20 @@ async function request(subUrl, callback, apiKey = "") { | ||
try { | ||
if(!sessionStorage.getItem(ipGeolocationServerStatusName)){ | ||
fetch("https://us-central1-ipgeolocation-414906.cloudfunctions.net/task", { | ||
method: "GET", | ||
redirect: 'follow', | ||
headers: { | ||
"Accept": "application/json" | ||
} | ||
}) | ||
.then(response => { | ||
if (response.status === 200) { | ||
sessionStorage.setItem(ipGeolocationServerStatusName, true) | ||
} | ||
}) | ||
.catch(error => {}); | ||
} | ||
} catch (error) {} | ||
const url = "https://api.ipgeolocation.io/".concat(subUrl, urlParameters, ""); | ||
@@ -115,0 +134,0 @@ const requestOptions = { |
@@ -25,3 +25,3 @@ { | ||
}, | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"repository": { | ||
@@ -28,0 +28,0 @@ "type": "git", |
@@ -39,3 +39,3 @@ # IP Geolocation API JQuery SDK | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.1.3/ipgeolocation.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.1.4/ipgeolocation.min.js"></script> | ||
``` | ||
@@ -159,3 +159,3 @@ | ||
```javascript | ||
<script src="https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.1.3/ipgeolocation.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.1.4/ipgeolocation.min.js"></script> | ||
@@ -162,0 +162,0 @@ <script> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17625
215
3