pb javascript