diff --git a/lib/better_errors/templates/main.erb b/lib/better_errors/templates/main.erb index 136e8a67..5c1c71dd 100644 --- a/lib/better_errors/templates/main.erb +++ b/lib/better_errors/templates/main.erb @@ -420,7 +420,7 @@ * Display area * --------------------------------------------------------------------- */ - .no-javascript-notice { + p.no-javascript-notice { margin-bottom: 1em; padding: 1em; border: 2px solid #e00; @@ -770,7 +770,7 @@
- Better Errors can't apply inline style, + Better Errors can't apply inline style (or run Javascript), possibly because you have a Content Security Policy along with Turbolinks. But you can open the interactive console in a new tab/window. @@ -850,6 +850,11 @@ document.querySelector('body').classList.remove("better-errors-javascript-not-loaded"); document.querySelector('body').classList.add("better-errors-javascript-loaded"); + var noJSNotices = document.querySelectorAll('.no-javascript-notice'); + for(var i = 0; i < noJSNotices.length; i++) { + noJSNotices[i].remove(); + } + function apiCall(method, opts, cb) { var req = new XMLHttpRequest(); req.open("POST", "//" + window.location.host + <%== uri_prefix.gsub("<", "<").inspect %> + "/__better_errors/" + OID + "/" + method, true);