If APP_NAME is undeclared in user javascript, then get it from the URL.