mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-26 07:49:24 +01:00
Merge branch 'develop' into video, merge wb.js
Add double init check for wombat
This commit is contained in:
commit
336289b337
@ -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