title: Convert a youtube video url to embed code
body: <p>I'm using this to convert youtube url to embed url.</p>
  
  <pre><code>text(t).html().replace(/(?:http:\/\/)?(?:www\.)?(?:youtube\.com)\/(?:watch\?v=)?(.+)/g, '&lt;iframe width="320" height="280" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;')
  </code></pre>
  
  <p>How can I make it ignore itself?</p>
  
  <pre><code>t = $('&lt;div&gt;&lt;/div&gt;').text(t).html().replace(/(?:http:\/\/)?(?:www\.)?(?:youtube\.com)\/(?:watch\?v=)?(.+)/g, '&lt;iframe width="400" height="380" src="//www.youtube.com/embed/$1" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;')
  </code></pre>
  
  <p>and an embedded link</p>
  
  <pre><code>&lt;iframe width="560" height="315" src="//www.youtube.com/embed/1adfD9" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>Or, In other words, how can I make it work only on links like this and ignore everything else?</p>
  
  <pre><code>http://www.youtube.com/watch?v=1adfD9
  www.youtube.com/watch?v=1adfD9
  youtube.com/watch?v=1adfD9
  </code></pre>