* web/commons/common_client.ml: factorize js helpers