allow custom URL on client-side javascript