added comments to script
moved implementation to js bookmarklet