Update bookmarklet.js

Wrap code in a function to avoid name conflicts