<!-- WB Insert -->
<script>
  wbinfo = {}
  wbinfo.url = "{{ cdx.url }}";
  wbinfo.timestamp = "{{ cdx.timestamp }}";
  wbinfo.request_ts = "{{ wbrequest.wb_url.timestamp }}";
  wbinfo.prefix = "{{ wbrequest.wb_prefix }}";
  wbinfo.mod = "{{ wbrequest.wb_url.mod }}";
  wbinfo.top_url = "{{ top_url }}";
  wbinfo.is_framed = {{ "true" if wbrequest.options.is_framed else "false" }};
  wbinfo.is_live = {{ "true" if cdx.is_live else "false" }};
  wbinfo.coll = "{{ wbrequest.coll }}";
  wbinfo.proxy_magic = "{{ wbrequest.env.pywb_proxy_magic }}";
  wbinfo.static_prefix = "{{ wbrequest.host_prefix }}/{{ static_path }}";
</script>

{% if rule.js_rewrite_location != 'urls' and include_wombat %}
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wombat.js'> </script>
<script>
{% set urlsplit = cdx.url | urlsplit %}
  wbinfo.wombat_ts = "{{ cdx['timestamp'] if include_ts else ''}}";
  wbinfo.wombat_scheme = "{{ urlsplit.scheme }}";
  wbinfo.wombat_host = "{{ urlsplit.netloc }}";
  wbinfo.wombat_sec = "{{ cdx.timestamp | format_ts('%s') }}";

  wbinfo.wombat_opts = {{ wbrequest.rewrite_opts.client | tojson if wbrequest.rewrite_opts.client else '{}' }};


  if (window && window._WBWombat && !window._wb_js_inited && !window._wb_wombat) {
    window._wb_wombat = new _WBWombat(wbinfo);
  }
</script>
{% endif %}

<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wb.js'> </script>
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/vidrw.js'> </script>

{% include banner_html ignore missing %}

<!-- load banner -->
<script> if (_wb_js) { _wb_js.load(); }</script>

{#
<!-- workaround for chrome iframe scrolling issue -->
{% if wbrequest.options.is_framed %}
<style type="text/css">
 * {
   -webkit-transform: none !important;
 }
</style>
{% endif %}
#}

<!-- End WB Insert -->

