Commits

Eric Fredricksen committed ebcd532

Reluctantly get rid of the lovely ascii art error titles

Comments (0)

Files changed (1)

 <style>
 * { font: 14px monospace; }
 body { width: 100%; }
-XXvideo, XXcanvas { display: none; }
+video, canvas { display: none; }
 #outer {
   margin: 0 auto;
   width: 100%;
 /_/|_/____/____/__/__/ /  |__/__/____/____/____/_/|_/__/_/__/ / 
 \_\\_\____\____\__\__\/   \__\\__\____\___\____\_\\_\__\_\__\/  
                                                                 
-
+</script>
+<script id=skzzt type=ascii-art>
 ...FFFFthhhhhh...SKZZZTssTKHHHKHHhhh...hhhSHHHHHHHhhhhFFFFfff...
 
 Attempting to establish video downlink...
 Click the 'Allow' button up above.
 </script>
 <script id=nocamera type=ascii-art>
-   __  __ ________         ___  __   ____  ____  ________  __ 
-  /  / _//  __/  , \ ____ / , \/  /\/    \/    \/  /  __/\/ /\
- /    \ /  __/     //___// ,  /  /_/  O  /  O  /  /  __/\/_/ /
-/__/\__|____/__/\__\\___/____/____/\____/\____/__/____/\/_/\/ 
-\__\/\__\___\__\/\__\   \__\/\____\/\____/\___\__\____\/\_\/  
-                                                              
+KER-BLOOIE!
 
 Couldn't grab the camera feed; not sure why not.
 Did you deny access to it?
 Do you even have a camera attached?
 </script>
 <script id=nosupport type=ascii-art>
-   __  __ ________         ___  ____  _  _  __  __ 
-  /  / _//  __/  , \ ____ / , \/    \| |/ |/ /\/ /\
- /    \ /  __/     //___//  __/  O  /|      / /_/ /
-/__/\__|____/__/\__\\___/__/ _\____/ |__/__/ /_/\/ 
-\__\/\__\___\__\/\__\   \__\/  \___/ \__\__\/\_\/  
-                                                   
+KER-POW!
 
 It seems your browser doesn't support webcam video capture.
 Try Google Chrome, perhaps.
 var HREVERSE = true;
 var MESSAGE;
 
+function msg(id) {
+  MESSAGE = 
+    document.querySelector('#title').innerText +
+    document.querySelector('#' + id).innerText;
+}
+
 function go() {
-  MESSAGE = document.querySelector('#title').innerText;
+  msg('skzzt');
   if (navigator.getUserMedia) {
     navigator.getUserMedia({audio: false, video: true}, function (stream) {
         video.src = window.URL.createObjectURL(stream);
         MESSAGE = null;
       }, function (err) {
-        MESSAGE = document.querySelector('#nocamera').innerText;
+        msg('nocamera');
       })
   } else {
-    MESSAGE = document.querySelector('#nosupport').innerText;
+    msg('nosupport');
   }
 }