Update app script.js

Improvement: Reduce the lines of coding
Improvement: Improve refreshes all rows color performance
Improvement: Increase the coding readability
Update: Prepare New Lines function which includes
- auto generate the sequence number
- insert selection list in the next row
Fixed: Handle some execution