2022-10-10 07:04:14 -04:00
|
|
|
function fetchback(url,cback){
|
|
|
|
fetch(url).then((request)=>request.json()).then((data)=>cback(data));
|
|
|
|
}
|
|
|
|
|
2022-10-09 11:48:31 -04:00
|
|
|
function interverse_data(url,cback){
|
2022-10-10 07:04:14 -04:00
|
|
|
url = interverse_proxy+"/initial?url="+url
|
2022-10-09 11:48:31 -04:00
|
|
|
fetch(url).then((response)=> {
|
|
|
|
if (!response.ok){
|
|
|
|
return {}
|
|
|
|
}
|
|
|
|
return response.json();
|
|
|
|
}).then((data)=>cback(data))
|
2022-01-25 23:49:52 -05:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-10-09 11:48:31 -04:00
|
|
|
// https://davidwalsh.name/query-string-javascript
|
2022-01-25 23:49:52 -05:00
|
|
|
function getUrlParameter(name) {
|
|
|
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
|
|
|
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
|
|
|
var results = regex.exec(location.search);
|
|
|
|
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
2022-10-09 11:48:31 -04:00
|
|
|
};
|
|
|
|
|