diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index fc8b7a343a..7e20b0222b 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -13,9 +13,16 @@
//= require jquery
//= require jquery_ujs
//= require turbolinks
+//= require vendor
//= require bootstrap
//= require_self
//= require_directory .
//= require judge/utils.js
//= require judge/diff.js
//= require judge/feedbackTable.js
+
+$(function () {
+ if (!Modernizr.templatestrings) {
+ $(".messages").append("
Sorry, je browser lijkt niet alle nodige JavaScript features te ondersteunen. Met een recente versie van Google Chrome of Firefox zou alles moeten werken.
")
+ }
+});
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index b81ef8bd13..24e5c749ec 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -14,6 +14,7 @@
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
+ <%= javascript_include_tag :modernizr %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
@@ -37,15 +38,16 @@
-
- <% flash.each do |key, value| %>
- <% unless value.nil? %>
- <%= content_tag(:div, value, :class => "alert alert-info") if key == "notice" %>
- <%= content_tag(:div, raw("
Oh snap! ")+value, :class => "alert alert-danger") if key == "error" %>
- <%= content_tag(:div, raw("
Opgepast! ")+value, :class => "alert alert-warning") if key == "alert" %>
- <%= content_tag(:div, value, :class => "alert alert-success") if key == "success" %>
+
+ <% flash.each do |key, value| %>
+ <% unless value.nil? %>
+ <%= content_tag(:div, value, :class => "alert alert-info") if key == "notice" %>
+ <%= content_tag(:div, raw("Oh snap! ")+value, :class => "alert alert-danger") if key == "error" %>
+ <%= content_tag(:div, raw("Opgepast! ")+value, :class => "alert alert-warning") if key == "alert" %>
+ <%= content_tag(:div, value, :class => "alert alert-success") if key == "success" %>
+ <% end %>
<% end %>
- <% end %>
+
<%= yield %>
diff --git a/vendor/assets/javascripts/modernizr/modernizr.min.js b/vendor/assets/javascripts/modernizr/modernizr.min.js
new file mode 100644
index 0000000000..8fb21a7b45
--- /dev/null
+++ b/vendor/assets/javascripts/modernizr/modernizr.min.js
@@ -0,0 +1,3 @@
+/*! modernizr 3.3.1 (Custom Build) | MIT *
+ * http://modernizr.com/download/?-templatestrings !*/
+!function(window,document,undefined){function is(n,e){return typeof n===e}function testRunner(){var n,e,o,r,s,t,i;for(var a in tests)if(tests.hasOwnProperty(a)){if(n=[],e=tests[a],e.name&&(n.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(o=0;o