Updated Javascript plugin