Update main.js.download
This commit is contained in:
parent
015ce0cb47
commit
873e71b41f
|
@ -182,6 +182,21 @@ function commander(cmd) {
|
||||||
window.open('https://www.google.com');
|
window.open('https://www.google.com');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
break;
|
break;
|
||||||
|
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":
|
case "update":
|
||||||
addLine("Opening Updater...", "color2", 80);
|
addLine("Opening Updater...", "color2", 80);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
Loading…
Reference in New Issue