title: Detecting when inside an iframe and then hiding elements
body: <p>I hope some of you better than me at coding can help.</p>
  
  <p>I have a simple webpage (www.mypage.com). It has 5 links</p>
  
  <p>Link 1 (www.mypage.com/link1.html)
  Link 2 (www.mypage.com/link2.html)
  Link 3 (www.mypage.com/link3.html)
  Link 4 (www.mypage.com/link4.html)
  Link 5 (www.mypage.com/link5.html)</p>
  
  <p>Now from the main homepage, clicking on the link opens up a popup window using an iframe to display the page they clicked.</p>
  
  <p>Now what I want to do is that when people click the link via the mainpage and hence get a popup/iframe, that on that page eg  (www.mypage.com/link1.html) I want to hide some elements. The elements are things link Menu and Banner.</p>
  
  <p>Now if a person enters one of the links manually eg typing www.mypage.com/link1.html directly into their browser, then I want the Banner and Banner to show.</p>
  
  <p>Is there anyway I can do this? 
  Is there some javascript that can run that if it detects it's an iframe that it can do a display:none on the elements I want to hide?</p>
  
  <p>Many thanks in advance.</p>