[CB-2305] Streamline injected javascript