Modifying the js as required