Add javascript code to prevent errors from trashing our site
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 10 Jun 2016 20:55:04 +0000 (16:55 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 10 Jun 2016 20:55:04 +0000 (16:55 -0400)
Take any errors and log to console.

header.php
style.css

index 999db9c..b4810d3 100755 (executable)
                 </form>
                 <a class="close-reveal-modal">&#215;</a>
             </div>
+<script>
+function showerror(e) {
+       e.preventDefault();
+       console.log('Error:' + e.message);
+       console.log('Line:' + e.lineno);
+       console.log('URL:' + e.filename);
+       return false;
+}
+addEventListener('error', showerror);
+</script>
 
         <!-- Off-Canvase Nav !-->
         <div class="sticky">
index 6de439e..3d91487 100755 (executable)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: Grey Gables Restaurant
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme created for Grey Gables Restaurant.
-Version: 1.0.3
+Version: 1.0.4
 */