}
if (!this.whoami_host) {
console.info("Asking for hostname");
- this.whoami_host = prompt("Hostname (FQDN)", "<?=$hostname?>");
+ // Default value
+ this.whoami_host = (new URLSearchParams(location.search.substring(1))).get("hostname");
+ if (this.whoami_host === null) this.whoami_host = "pc.local";
+ // Ask for the hostname
+ this.whoami_host = prompt("Hostname (FQDN)", this.whoami_host);
this.whoami_host_full = this.whoami_host;
if (this.whoami_host === null)
- this.whoami_host = "pc";
+ this.whoami_host = "pc.local";
}
if (!this.whoami_format) {
- console.info("Asking for format");
- this.whoami_format = prompt("Format (unix|windows)", "unix");
- if (this.whoami_format === null)
- this.whoami_format = "windows";
+ //console.info("Asking for format");
+ //this.whoami_format = prompt("Format (unix|windows)", "unix");
+ //if (this.whoami_format === null)
+ // this.whoami_format = "windows";
+ console.debug("Not asking for format anymore, using default value \"unix\".");
+ this.whoami_format = "unix";
}
/*var urlParams = new URLSearchParams(window.location.search);
if (localStorage.getItem("whoami_host") !== null) {
this.whoami_host = localStorage.getItem("whoami_host");
} else {
- this.whoami_host = "pc";
+ this.whoami_host = "pc.local";
}
}
if (this.whoami_format === null)
- this.whoami_format = "windows";
+ this.whoami_format = "unix";
this.update();
},