Changed script to look for 'href' and 'url' attributes in all elements instead