Could anyone help me with a function for JavaScript which searches the source code and compares all of the links on the site with the specific link I am looking for.
function find_link_by_href(address) links = document.getElementsByTagName("a"); for(var i = 0; i < links.length; i++) { if( links[i].href === address ) { console.log("Url found"); return; } }
You can call it like this:
find_link_by_href("http://www.youtube.com/SPECIFICURL");