blob: c50c1728f07e34bbb55b73961982320e559a65a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// @license magnet:?xt=urn:btih:5305d91886084f776adcf57509a648432709a7c7&dn=x11.txt
/*
* Ousía Website JS
*
* (c) Andreas Stöckel, 2015
*
* This work is licensed under the X11 (MIT) license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function () {
"use strict";
/* Enable code highlighting (this will eventually be natively supported by
Ousía) */
document.addEventListener("DOMContentLoaded", function(event) {
var codeBlocks = document.querySelectorAll("pre.code[data-lang]");
for (var i = 0; i < codeBlocks.length; i++) {
var block = codeBlocks[i];
var lang = block.getAttribute("data-lang");
var text = block.textContent;
if (lang in Prism.languages) {
var res = Prism.highlight(text, Prism.languages[lang]);
block.innerHTML = res;
}
}
});
})();
// @license-end
|