js: add function to get current position