File: genindex.html

package info (click to toggle)
python-discord 2.5.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,180 kB
  • sloc: python: 46,013; javascript: 363; makefile: 154
file content (27 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (3)
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
{%- extends "basic/genindex.html" %}

{% block body %}
  {{ super() }}
  <!-- Inject some JavaScript to convert the index names into something useful. -->
  <script>
    let elements = document.querySelectorAll("table.indextable a");

    // this is pretty finicky but it should work.
    for(let el of elements) {
      let key = el.getAttribute('href').split('#', 2)[1]
      if(!key.startsWith('discord.')) {
        continue;
      }

      if(key.startsWith('discord.ext.')) {
        key = key.substr(12); // discord.ext.
      }

      if(el.textContent.indexOf('()') !== -1) {
        key = key + '()'
      }
      el.textContent = key;
    }
    document.querySelectorAll("td").forEach(el => el.style.width = 'auto');
  </script>
{% endblock %}