[JS] - Added a check function to select scripts