A mediator for JavaScript applications