mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
Improve main page (index.html) speed (#1577)
* Inline Font Awesome icons using SVG * Add license information header * Preload KaTeX fonts * Defer loading javascripts * Cleanup stylesheet links * Invoke startup script immediately * Fix typo * Add leading zeros
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-var */
|
||||
/* global katex: false */
|
||||
window.startup = function() {
|
||||
(function() {
|
||||
var tex = document.getElementsByClassName("tex");
|
||||
Array.prototype.forEach.call(tex, function(el) {
|
||||
katex.render(el.getAttribute("data-expr"), el);
|
||||
@@ -31,4 +31,4 @@ window.startup = function() {
|
||||
});
|
||||
|
||||
doDemo();
|
||||
};
|
||||
})();
|
||||
|
Reference in New Issue
Block a user