mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-26 15:59:23 +01:00
cleanup rewrite_content/fetch_request api to take a full wb_url add content-length to responses whenever possible (WbResponse) and static files bump version to 0.5.2
29 lines
1.2 KiB
HTML
29 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.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.is_proxy_mode = {{ "true" if wbrequest.options.is_proxy else "false" }};
|
|
</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 -->
|
|
|