try{window.close();}catch(e){}
if(window.opener && !window.opener.closed){
  var data = {type:"momcs_authorized"};
  if(typeof momcs_oauth_data !== "undefined" && momcs_oauth_data.uuid){
    data.uuid = momcs_oauth_data.uuid;
  }
  window.opener.postMessage(data, "*");
}
