convert openify connector to javascript