From 15fc9571630390d913aaf4e6aa7d3e880b684367 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Wed, 1 Apr 2015 21:33:22 +0200 Subject: [PATCH] Bootlint integration --- app/views/layouts/_bootlint.haml | 4 ++++ app/views/layouts/_head.html.haml | 1 + 2 files changed, 5 insertions(+) create mode 100644 app/views/layouts/_bootlint.haml diff --git a/app/views/layouts/_bootlint.haml b/app/views/layouts/_bootlint.haml new file mode 100644 index 00000000000..69280687a9d --- /dev/null +++ b/app/views/layouts/_bootlint.haml @@ -0,0 +1,4 @@ +:javascript + jQuery(document).ready(function() { + javascript:(function(){var s=document.createElement("script");s.onload=function(){bootlint.showLintReportForCurrentDocument([], {hasProblems: false, problemFree: false});};s.src="https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js";document.body.appendChild(s)})(); + }); diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index d12145651af..78d6d08ee1f 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -16,6 +16,7 @@ = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id') = render 'layouts/piwik' if extra_config.has_key?('piwik_url') && extra_config.has_key?('piwik_site_id') + = render 'layouts/bootlint' if Rails.env == 'development' -# Atom feed - if current_user