title: Check if page is in Iframe for Google Chrome
body: <p>I have tried many properties of window to see if a page in an iframe can tell if it is in an iframe. I have tried:</p>
  
  <pre><code>if(top.location!= self.location) //doesn't work in Google Chrome
     alert("I am in an iframe!")
  </code></pre>
  
  <p>And this doesn't work (works on all browsers but Chrome). I am writing a userscript for Firefox and Chrome but Chrome really doesn't behave. Is there a way to tell if Chrome can detect if its page is in an iframe? </p>