Add JS for pattern library