friendica-addons-sekb/highlightjs/highlightjs.js
Hypolite Petovan 27a48ae84a [highlightjs] Use new 'head'/'footer' hooks
- Create separate addon javascript file
- Register stylesheet and Javascript files
2018-09-20 21:32:47 -04:00

6 lines
226 B
JavaScript

hljs.initHighlightingOnLoad();
document.addEventListener('postprocess_liveupdate', function () {
var blocks = document.querySelectorAll('pre code:not(.hljs)');
Array.prototype.forEach.call(blocks, hljs.highlightBlock);
});