Update 'twitch/chatguessr.js'

This commit is contained in:
sora 2022-04-23 21:09:38 +02:00
parent 1fbe40143a
commit 0e840d827d

View File

@ -4,14 +4,12 @@
var HttpRequest = Packages.com.gmt2001.HttpRequest,
HashMap = Packages.java.util.HashMap,
JSONObject = Packages.org.json.JSONObject,
header = new HashMap(0),
json = new JSONObject('{}');
var request = HttpRequest.getData(HttpRequest.RequestType.GET,'https://www.geoguessr.com/api/v3/games/'+id,json.toString(),header);
header = new HashMap(0);
var request = HttpRequest.getData(HttpRequest.RequestType.GET,'https://www.geoguessr.com/api/v3/games/'+id,'',header);
if (request.success) {
var data = new JSONObject(request.content)
return JSON.parse(data);
}
return {};
};
function getCountryBDC(location) {