Add apiRequest and panels functionality to javascript.