diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-07-22 10:30:26 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-07-22 10:30:26 +0200 |
commit | 841f9d0f9bb766b8dc67c7f2fa3c25a2555a8f19 (patch) | |
tree | 3f40f2c563ef747f1a03133db2e9e0c80217a67c /index.html | |
parent | 062918b5e2b3d01d842500425853782b08905596 (diff) | |
download | fosdem-2018-presentation-841f9d0f9bb766b8dc67c7f2fa3c25a2555a8f19.tar fosdem-2018-presentation-841f9d0f9bb766b8dc67c7f2fa3c25a2555a8f19.tar.gz |
only load highlight.js if there's a 'pre code' block on page
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -408,7 +408,7 @@ function linkify( selector ) { { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, + { src: 'plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } }, { src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } } ] |