1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 08:04:49 +01:00

Merge branch 'develop' into video, merge wb.js

Add double init check for wombat
This commit is contained in:
Ilya Kreymer 2014-12-07 23:54:20 -08:00
commit 336289b337
2 changed files with 8 additions and 2 deletions

View File

@ -61,7 +61,7 @@ this.ts_to_date = function(ts, is_gmt)
return ts;
}
var datestr = (ts.substring(0, 4) + "-" +
var datestr = (ts.substring(0, 4) + "-" +
ts.substring(4, 6) + "-" +
ts.substring(6, 8) + "T" +
ts.substring(8, 10) + ":" +
@ -121,6 +121,12 @@ function notify_top() {
}
this.load = function() {
if (window._wb_js_inited) {
return;
}
window._wb_js_inited = true;
if ((window.self == window.top) && wbinfo) {
if (wbinfo.top_url && (window.location.href != wbinfo.top_url) && wbinfo.mod != "bn_") {
// Auto-redirect to top frame

View File

@ -3,7 +3,7 @@
<script src='{{ wbrequest.host_prefix }}/{{ static_path }}/wombat.js'> </script>
<script>
{% 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}}",
"{{ cdx['timestamp'] if include_ts else ''}}",
"{{ urlsplit.scheme }}",