When you want to save a page, you then click on the bookmark ( which contains JavaScript)
It will get the information of the current page and execute it ( check the js code behind the bookmarklet)
Ps. HN has this too