We try to move all HTML strings in the JS to a constant at the top and call it something like: `var TPL_VIDEO_AVAILABLE = '<div class="chat-video-available"></div>'`.
Also, you don't need to create the node first, you can feed the HTML to placeAfter directly (it will create the node for you).