title: iframe keeps on opening link on another tab when trying to play video
body: <p>I have a iframe in my web page of a video from another site but when i click play or anywhere in the iframe space it opens a link to the site with the video  of it.</p>
  
  <p>I'm trying to make a site for playing series and i want to use iframe to show the video from another site rather than downloading it.</p>
  
  <p>I've tried everything but i viewed the other sites source code and it seems it has some java code i suppose that's causing the issue preventing the iframe from working.</p>
  
  <p><a href="http://entervideo.net/watch/94c96f7dc0bd33c" rel="nofollow noreferrer">http://entervideo.net/watch/94c96f7dc0bd33c</a> </p>
  
  <p>that's the link above, could you kindly inspect the source code first.</p>
  
  <p>This is the code that I tried:</p>
  
  <pre><code>&lt;iframe style ="display:block; margin: 0 auto;" width="1238" height="696" 
  allowfullscreen="" webkitallowfullscreen="" mozallowfullscreen="" 
  frameborder="0" src="http://entervideo.net/watch/94c96f7dc0bd33c" 
  scrolling="no"  target="_self"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>(Down below is the java script code from the link and I think it's causing the problem)</p>
  
  <pre><code>&lt;script&gt;
  function inIframe () {
      try {
          return window.self !== window.top;
      } catch (e) {
          return true;
      }
  }
  console.log(document.referrer);
  
  console.log(inIframe());
  //if(!document.referrer&amp;&amp;inIframe()) document.write('&lt;a 
  href="http://entervideo.net/watch/94c96f7dc0bd33c" target="_blank" 
  style="position:fixed; display:block; height:100%; width:100%; z-index:99999; 
  
      top: 0;left: 0; background: rgba(255, 255, 255, 0.1);color:#fff;font-
  
  size:30px;"&gt;Please remove sandbox tags on the iframe.&lt;/a&gt;');
  
  if(document.referrer||!inIframe()){
  
      var element = document.getElementById("ptc"); 
  
      element.parentNode.removeChild(element);
  
  console.log('deleting');
  
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>i want it to play the video on my web page when i click on the play button on the control rather than it opening the link to the other site.</p>