using an anonymous function for the bookmarklet as per user feedback