use pure JS to insert diff in the page