Upstream has expressed concern about doing this client side instead of on the server: https://secure.phabricator.com/T8603