storing current location in JS file