now works also with remote access (not only localhost).

it works by get the IP address of the server from javascript location object and then assemble all URLs with that obtained IP, instead of localhost