mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 15:09:54 +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() {
|
||||
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
|
||||
|
@ -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 }}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user