content/hifi-public/cozza13/scripts/example/locationExample.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

11 lines
584 B
JavaScript

var goto = Window.prompt("Where would you like to go? (ex. @username, #location, 1.0,500.3,100.2)");
var url = "hifi://" + goto;
print("Going to: " + url);
location = url;
// If the destination location is a user or named location the new location may not be set by the time execution reaches here
// because it requires an asynchronous lookup. Coordinate changes should be be reflected immediately, though. (ex: hifi://0,0,0)
print("URL: " + location.href);
print("Protocol: " + location.protocol);
print("Hostname: " + location.hostname);
print("Pathname: " + location.pathname);