edited popup.js to work on all links in a given page.