mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
wb.js: preserve anchor in location redirect
update CHANGELIST
This commit is contained in:
parent
80c5b45178
commit
09861ada2c
@ -1,6 +1,8 @@
|
|||||||
pywb 0.6.6 changelist
|
pywb 0.6.6 changelist
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* JS client side improvements: check for double-inits, preserve anchor in wb.js top location redirect
|
||||||
|
|
||||||
* JS Rewriters: add mixins for link + location (default), link only, location only rewriting by setting ``js_rewrite_location`` to ``all``, ``urls``, ``location``, respectively.
|
* JS Rewriters: add mixins for link + location (default), link only, location only rewriting by setting ``js_rewrite_location`` to ``all``, ``urls``, ``location``, respectively.
|
||||||
|
|
||||||
(New: location only rewriting does not change JS urls)
|
(New: location only rewriting does not change JS urls)
|
||||||
|
@ -129,11 +129,13 @@ this.load = function() {
|
|||||||
|
|
||||||
if ((window.self == window.top) && wbinfo) {
|
if ((window.self == window.top) && wbinfo) {
|
||||||
|
|
||||||
|
var hash = window.location.hash;
|
||||||
|
|
||||||
var loc = window.location.href.replace(window.location.hash, "");
|
var loc = window.location.href.replace(window.location.hash, "");
|
||||||
|
|
||||||
if (wbinfo.top_url && (loc != wbinfo.top_url) && wbinfo.mod != "bn_") {
|
if (wbinfo.top_url && (loc != wbinfo.top_url) && wbinfo.mod != "bn_") {
|
||||||
// Auto-redirect to top frame
|
// Auto-redirect to top frame
|
||||||
window.location.replace(wbinfo.top_url);
|
window.location.replace(wbinfo.top_url + hash);
|
||||||
} else {
|
} else {
|
||||||
// Init Banner (no frame or top frame)
|
// Init Banner (no frame or top frame)
|
||||||
add_event("readystatechange", init_banner, document);
|
add_event("readystatechange", init_banner, document);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user