diff --git a/content/assets/scripts/cammie.js b/content/assets/scripts/cammie.js index d8442fe5..dc72d481 100644 --- a/content/assets/scripts/cammie.js +++ b/content/assets/scripts/cammie.js @@ -23,8 +23,27 @@ debounce = function(func, wait, initial) { }; }; +var cammieError = false; function cammie_error() { - $("#cammie-feed").attr("src","/assets/images/cammie_down.svg") + cammieError = true; + document.getElementById("cammie-ctrls").remove(); + document.getElementById("cammie-ctrls-2").remove(); + $("#cammie-feed").attr("src","/assets/images/cammie_down.svg") +} +var cammieTimerStarted = false; +function cammie_loaded() { + if (cammieTimerStarted) { + return; + } + showWarning = function() { + if (!cammieError) { + document.getElementById("cammieFeedDisconnected").classList.remove("is-hidden"); + document.getElementById("cammie-ctrls").remove(); + document.getElementById("cammie-ctrls-2").remove(); + } + }; + setTimeout(showWarning, 25000); + cammieTimerStarted = true; } $("#cammie-ctrls").mousemove(debounce(function() { diff --git a/content/cammie.erb b/content/cammie.erb index b75898a5..20ce22f1 100644 --- a/content/cammie.erb +++ b/content/cammie.erb @@ -16,9 +16,14 @@ socket.on('replymessage', function(obj) { <% end %>
+
- cammie + cammie
@@ -59,7 +64,7 @@ socket.on('replymessage', function(obj) {
-