diff --git a/pywb/static/default_banner.js b/pywb/static/default_banner.js
index 476c5a10..9973432e 100644
--- a/pywb/static/default_banner.js
+++ b/pywb/static/default_banner.js
@@ -25,10 +25,6 @@ This file is part of pywb.
_wb_js.create_banner_element = function(banner_id)
{
- var banner_labels = {LOADING_MSG: "Loading...",
- REPLAY_MSG: "This is an archived page from ",
- LIVE_MSG: "This is a live page loaded on "};
-
var banner = document.createElement("wb_div");
banner.setAttribute("id", banner_id);
banner.setAttribute("lang", "en");
@@ -36,11 +32,11 @@ _wb_js.create_banner_element = function(banner_id)
var text;
if (wbinfo.is_frame) {
- text = banner_labels.LOADING_MSG;
+ text = _wb_js.banner_labels.LOADING_MSG;
} else if (wbinfo.is_live) {
- text = banner_labels.LIVE_MSG;
+ text = _wb_js.banner_labels.LIVE_MSG;
} else {
- text = banner_labels.REPLAY_MSG;
+ text = _wb_js.banner_labels.REPLAY_MSG;
}
text = "" + text + "";
diff --git a/pywb/static/wb.js b/pywb/static/wb.js
index 22b3c746..9406cacd 100644
--- a/pywb/static/wb.js
+++ b/pywb/static/wb.js
@@ -42,6 +42,10 @@ function init_banner() {
_wb_js.create_banner_element(bid);
}
+this.banner_labels = {LOADING_MSG: "Loading...",
+ REPLAY_MSG: "This is an archived page from ",
+ LIVE_MSG: "This is a live page loaded on "};
+
this.create_banner_element = function() {
// No banner by default
return null;
diff --git a/pywb/static/wb_frame.js b/pywb/static/wb_frame.js
index af1a66f2..cc6a7b0f 100644
--- a/pywb/static/wb_frame.js
+++ b/pywb/static/wb_frame.js
@@ -84,9 +84,9 @@ function set_state(state) {
var label = document.getElementById("_wb_label");
if (label) {
if (state.is_live) {
- label.innerHTML = _wb_js.labels.LIVE_MSG;
+ label.innerHTML = _wb_js.banner_labels.LIVE_MSG;
} else {
- label.innerHTML = _wb_js.labels.REPLAY_MSG;
+ label.innerHTML = _wb_js.banner_labels.REPLAY_MSG;
}
}
@@ -147,3 +147,8 @@ function update_wb_url(url, ts, is_live) {
push_state(url, ts, capture_str, is_live);
}
+
+// Load Banner
+if (_wb_js) {
+ _wb_js.load();
+}
diff --git a/pywb/ui/frame_insert.html b/pywb/ui/frame_insert.html
index 9f232972..30e003e6 100644
--- a/pywb/ui/frame_insert.html
+++ b/pywb/ui/frame_insert.html
@@ -8,6 +8,7 @@
wbinfo.is_frame = true;
+