pocket api js script changes