Add term.js again

@minrk Can we merge this so that I don't have to cherry pick it again? I think we're confident that we want term.js, whatever we do on the backend.