Injected code for websocket client