Get data using current URL with JavaScript