lib/ecrire/app/assets/javascripts/admin.js in ecrire-0.25.2 vs lib/ecrire/app/assets/javascripts/admin.js in ecrire-0.26.0

- old
+ new

@@ -1,5 +1,20 @@ //= require turbolinks //= require observejs //= require_tree ./admin //= require_tree ./vendor //= require_tree ./shared + +// Not loading this with ObserveJS cuz the layout +// would require to declare a class for it to load. +var script = document.getElementsByTagName('script'); + +script = script[script.length - 1]; + +if (script) { + Prism.filename = script.src; + + if (document.addEventListener && !script.hasAttribute('data-manual')) { + document.addEventListener('DOMContentLoaded', Prism.highlightAll); + document.addEventListener('page:load', Prism.highlightAll); + } +}