Working on support for Cinnamon 4.8 and newer

This commit is contained in:
2023-07-13 12:41:31 +02:00
parent 5628dfc4b0
commit 34ad4a9589
93 changed files with 25 additions and 16 deletions

View File

@@ -0,0 +1,14 @@
const Soup = imports.gi.Soup;
function estimateLocation() {
let sessionSync = new Soup.SessionSync();
let msg = Soup.Message.new('GET', "https://get.geojs.io/v1/ip/geo.json");
sessionSync.send_message(msg);
if (msg.status_code == 200) {
return JSON.parse(msg.response_body.data);
} else {
return -1;
}
}