If global.location.protocol isn't 'http:' or 'https:', use 'http:'. This makes behavior reasonable when the page is opened directly without using a server.
If global.location.protocol isn't 'http:' or 'https:', use 'http:'. This makes behavior reasonable when the page is opened directly without using a server.