nl_tokens: Open a popup using the first argument . Wait for it to close . Returns the window object
pl_tokens: function popupExecute ( execute , url , name , options , callback ) { var popupName = <mask> || defaultPopupName ( ) ; var popupOptions = optionsResolveCentered ( assign ( { } , defaultOptions , options ) ) ; var popupCallback = callback || function noop ( ) { } ; var optionsString = optionsToString ( popupOptions ) ; var win = execute ( url , popupName , optionsString ) ; var isMessageSent = false ; var interval ; function popupCallbackOnce ( err , data ) { if ( ! isMessageSent ) { isMessageSent = true ; popupCallback ( err , data ) ; } } function onMessage ( message ) { var data = message ? message . data : undefined ; if ( data ) { popupCallbackOnce ( undefined , data ) ; window . removeEventListener ( "message" , onMessage ) ; } } window . addEventListener ( "message" , onMessage , false ) ; if ( win ) { interval = setInterval ( function closePopupCallback ( ) { if ( win == null || win . closed ) { setTimeout ( function delayWindowClosing ( ) { clearInterval ( interval ) ; popupCallbackOnce ( new Error ( "Popup closed" ) ) ; } , 500 ) ; } } , 100 ) ; } else { popupCallbackOnce ( new Error ( "Popup blocked" ) ) ; } return win ; }