Welcome to mirror list, hosted at ThFree Co, Russian Federation.

katex-post-render.js « js « assets - gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cfd10f1bdc21f1afdad50e23823239026a973238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function getAll(selector) {
  return Array.prototype.slice
    .call(document.querySelectorAll(selector), 0);
}

// tabindex hack
function addTabIndex() {
  'use strict';

  const katexBlocks = getAll('span.katex-display');
  
  katexBlocks.forEach(function (el) {
    el.tabIndex = 0;
  });
}

addTabIndex();