From 80c5b45178100f4931ba5fb4dedf41668715c5b7 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Sat, 13 Dec 2014 23:12:42 -0800 Subject: [PATCH] wb.js: don't include anchor when comparing current url with expected top url --- pywb/static/wb.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pywb/static/wb.js b/pywb/static/wb.js index f6b2fb41..1974c59f 100644 --- a/pywb/static/wb.js +++ b/pywb/static/wb.js @@ -128,7 +128,10 @@ this.load = function() { window._wb_js_inited = true; if ((window.self == window.top) && wbinfo) { - if (wbinfo.top_url && (window.location.href != wbinfo.top_url) && wbinfo.mod != "bn_") { + + var loc = window.location.href.replace(window.location.hash, ""); + + if (wbinfo.top_url && (loc != wbinfo.top_url) && wbinfo.mod != "bn_") { // Auto-redirect to top frame window.location.replace(wbinfo.top_url); } else {