Update js global variables