bookmarklet: fix var error and build