Update main.js

add code to hide the hanging stuff