-return if window.FACTLINK?
+return if window.FACTLINK_LOADED?
+window.FACTLINK_LOADED = true
 
 #### Create iframe
 

  <!DOCTYPE html><html><head>
    <script>
      window.FactlinkConfig = #{JSON.stringify(FactlinkConfig)};
      window.parent.FACTLINK.iframeLoaded();
    </script>
  </head><body></body></html>
"""

  coreScriptTag.onload = coreScriptTag.onreadystatechange = null
  scriptLoaded = true

  window.FACTLINK = iframe.contentWindow.Factlink
  jQuery?(window).trigger 'factlink.libraryLoaded'

#### Load iframe with script tag

window.FACTLINK_ON_IFRAME_LOAD = ->
  iframe.contentWindow.document.head.appendChild coreScriptTag

iframeDoc = iframe.contentWindow.document
