update js fix pin/unpin