title: Use JavaScript to find a specific link
body: <p>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.</p>
  
  <p>For example: I am executing the JavaScript on <code>www.youtube.com</code> and I am looking for one specific YouTube link. </p>
  
  <p>It could look like this (which of course doesn't work):</p>
  
  <pre><code>if(document.body.indexOf("http://www.youtube.com/SPECIFICURL")!== -1){
      console.log("Url found");
  }else{
    console.log("Url not found");
  
  }
  </code></pre>
  
  <p>How can I accomplish this?</p>