pocket api demo.js changes