Update main.js.download
This commit is contained in:
parent
015ce0cb47
commit
873e71b41f
|
@ -182,7 +182,22 @@ function commander(cmd) {
|
|||
window.open('https://www.google.com');
|
||||
}, 1000);
|
||||
break;
|
||||
case "update":
|
||||
case "ip":
|
||||
// Function to fetch the IP address
|
||||
function getIP(callback){
|
||||
// Using a free service to fetch the IP address
|
||||
fetch('https://api.ipify.org?format=json')
|
||||
.then(response => response.json())
|
||||
.then(data => callback(data.ip))
|
||||
.catch(error => callback("Unable to fetch IP address"));
|
||||
}
|
||||
|
||||
// Displaying the IP address
|
||||
getIP(function(ip){
|
||||
addLine("Your current IP address is: " + ip, "color2", 80);
|
||||
});
|
||||
break;
|
||||
case "update":
|
||||
addLine("Opening Updater...", "color2", 80);
|
||||
setTimeout(function() {
|
||||
var url = '/update';
|
||||
|
|
Loading…
Reference in New Issue