JavaScript link interceptor to display dialog before continuing