title: Get top window url from frame/iframe in different domain
body: <p>I have a web page with some javascript inside that will be embedded as iframe in different websites. I need to adjust the behaviour of my page according to the website in which it's being run. For this purpose, I tried to read <code>top.location.href</code> from my page, but that raised an error:</p>
  
  <blockquote>
    <p>Unsafe JavaScript attempt to access frame with URL <a href="http://website.url" rel="noreferrer">http://website.url</a>
    from frame with URL <a href="http://mypage.url" rel="noreferrer">http://mypage.url</a>. Domains, protocols and ports
    must match.</p>
  </blockquote>
  
  <p>Is there some way to go around this?</p>