def javascript_prompt(url, js_msg, default, abort_on):
 log.js.debug('prompt: {}'.format(js_msg))
 if config.get('ui', 'modal-js-dialog'):
  raise CallSuper
 if config.get('content', 'ignore-javascript-prompt'):
  return (False, '')
 msg = '<b>{}</b> asks:<br/>{}'.format(html.escape(url.toDisplayString()), html.escape(js_msg))
 answer = message.ask('Javascript prompt', msg, mode=usertypes.PromptMode.text, default=default, abort_on=abort_on)
 if (answer is None):
  return (False, '')
 else:
  return (True, answer)

def javascript_prompt ( url , js_msg , default , abort_on ) : log . js . debug ( 'prompt: {}' . format ( js_msg ) ) if config . get ( 'ui' , 'modal-js-dialog' ) : raise CallSuper if config . get ( 'content' , 'ignore-javascript-prompt' ) : return ( False , '' ) msg = '<b>{}</b> asks:<br/>{}' . format ( html . escape ( url . toDisplayString ( ) ) , html . escape ( js_msg ) ) answer = message . ask ( 'Javascript prompt' , msg , mode = usertypes . PromptMode . text , default = default , abort_on = abort_on ) if ( answer is None ) : return ( False , '' ) else : return ( True , answer )
display a javascript prompt .