mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
docs: fix customizing banner example
This commit is contained in:
parent
09295747b7
commit
9b73200d90
@ -257,12 +257,12 @@ use the following script to the outer frame html:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
window.addEventListener("message", function(event.data) {
|
||||
if (event.data.wb_type == "load" && event.data.wb_type == "replace-url") {
|
||||
console.log("New Url: " + event.data.url);
|
||||
console.log("New Timestamp: " + event.data.ts);
|
||||
}
|
||||
}
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data.wb_type == "load" || event.data.wb_type == "replace-url") {
|
||||
console.log("New Url: " + event.data.url);
|
||||
console.log("New Timestamp: " + event.data.ts);
|
||||
}
|
||||
});
|
||||
|
||||
The ``load`` message is sent when a new page is first loaded, while ``replace-url`` is used
|
||||
for url changes caused by content frame History navigation.
|
||||
|
Loading…
x
Reference in New Issue
Block a user