Change generateMenuHoverScript to work.