mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-30 01:35:31 +01:00
selector 'select.pywb.proxy' stored in env['pywb_select'] and accessible to head insert and error handler
30 lines
1.2 KiB
HTML
30 lines
1.2 KiB
HTML
<!-- WB Insert -->
|
|
{% if rule.js_rewrite_location and include_wombat %}
|
|
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wombat.js'> </script>
|
|
<script>
|
|
{% set urlsplit = cdx.original | urlsplit %}
|
|
WB_wombat_init("{{ wbrequest.wb_prefix}}",
|
|
"{{ cdx['timestamp'] if include_ts else ''}}",
|
|
"{{ urlsplit.scheme }}",
|
|
"{{ urlsplit.netloc }}",
|
|
"{{ cdx.timestamp | format_ts('%s') }}");
|
|
</script>
|
|
{% endif %}
|
|
<script>
|
|
wbinfo = {}
|
|
wbinfo.url = "{{ cdx.original }}";
|
|
wbinfo.timestamp = "{{ cdx.timestamp }}";
|
|
wbinfo.capture_str = "{{ cdx.timestamp | format_ts }}";
|
|
wbinfo.prefix = "{{ wbrequest.wb_prefix }}";
|
|
wbinfo.is_embed = {{"true" if wbrequest.wb_url.is_embed else "false"}};
|
|
wbinfo.is_frame_mp = {{"true" if wbrequest.wb_url.mod == 'mp_' else "false"}};
|
|
wbinfo.canon_url = "{{ canon_url }}";
|
|
wbinfo.is_live = {{ "true" if cdx.is_live else "false" }};
|
|
wbinfo.proxy_select = "{{ wbrequest.env.pywb_proxy_select }}";
|
|
</script>
|
|
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wb.js'> </script>
|
|
<link rel='stylesheet' href='{{ wbrequest.host_prefix }}/{{ static_path }}/wb.css'/>
|
|
|
|
<!-- End WB Insert -->
|
|
|