mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
wombat fix: use __orig_parent when referencing top-frame, since window.parent is being overriden
This commit is contained in:
parent
78ae86b6b6
commit
148651680a
@ -107,7 +107,7 @@ function remove_event(name, func, object) {
|
||||
}
|
||||
|
||||
function notify_top() {
|
||||
if (window.parent != window.top) {
|
||||
if (window.__orig_parent != window.top) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -119,9 +119,11 @@ function notify_top() {
|
||||
return;
|
||||
}
|
||||
|
||||
window.parent.update_wb_url(window.WB_wombat_location.href,
|
||||
wbinfo.timestamp,
|
||||
wbinfo.is_live);
|
||||
if (window.__orig_parent && window.__orig_parent.update_wb_url) {
|
||||
window.__orig_parent.update_wb_url(window.WB_wombat_location.href,
|
||||
wbinfo.timestamp,
|
||||
wbinfo.is_live);
|
||||
}
|
||||
|
||||
remove_event("readystatechange", notify_top, document);
|
||||
}
|
||||
|
@ -975,6 +975,7 @@ _WBWombat = (function() {
|
||||
}
|
||||
|
||||
if (window.self.location != window.top.location) {
|
||||
window.__orig_parent = window.parent;
|
||||
if (is_framed) {
|
||||
window.top.WB_wombat_location = window.WB_wombat_location;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user