mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
Merge branch 'develop' into video, merge wb.js
Add double init check for wombat
This commit is contained in:
commit
336289b337
@ -61,7 +61,7 @@ this.ts_to_date = function(ts, is_gmt)
|
|||||||
return ts;
|
return ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
var datestr = (ts.substring(0, 4) + "-" +
|
var datestr = (ts.substring(0, 4) + "-" +
|
||||||
ts.substring(4, 6) + "-" +
|
ts.substring(4, 6) + "-" +
|
||||||
ts.substring(6, 8) + "T" +
|
ts.substring(6, 8) + "T" +
|
||||||
ts.substring(8, 10) + ":" +
|
ts.substring(8, 10) + ":" +
|
||||||
@ -121,6 +121,12 @@ function notify_top() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.load = function() {
|
this.load = function() {
|
||||||
|
if (window._wb_js_inited) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
window._wb_js_inited = true;
|
||||||
|
|
||||||
if ((window.self == window.top) && wbinfo) {
|
if ((window.self == window.top) && wbinfo) {
|
||||||
if (wbinfo.top_url && (window.location.href != wbinfo.top_url) && wbinfo.mod != "bn_") {
|
if (wbinfo.top_url && (window.location.href != wbinfo.top_url) && wbinfo.mod != "bn_") {
|
||||||
// Auto-redirect to top frame
|
// Auto-redirect to top frame
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wombat.js'> </script>
|
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wombat.js'> </script>
|
||||||
<script>
|
<script>
|
||||||
{% set urlsplit = cdx.original | urlsplit %}
|
{% set urlsplit = cdx.original | urlsplit %}
|
||||||
if (window && window._WBWombat) {
|
if (window && window._WBWombat && !window._wb_js_inited) {
|
||||||
var _wb_wombat = new _WBWombat("{{ wbrequest.wb_prefix}}",
|
var _wb_wombat = new _WBWombat("{{ wbrequest.wb_prefix}}",
|
||||||
"{{ cdx['timestamp'] if include_ts else ''}}",
|
"{{ cdx['timestamp'] if include_ts else ''}}",
|
||||||
"{{ urlsplit.scheme }}",
|
"{{ urlsplit.scheme }}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user