Update javascript to support configurations