mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-11-03 23:12:56 +00:00 
			
		
		
		
	Make the generated index page more useful for Ctrl + F.
This commit is contained in:
		
							
								
								
									
										18
									
								
								docs/_templates/genindex.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								docs/_templates/genindex.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
{%- 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(el.textContent.endsWith('method)') || el.textContent.indexOf('()') !== -1) {
 | 
			
		||||
        key = key + '()'
 | 
			
		||||
      }
 | 
			
		||||
      el.textContent = key;
 | 
			
		||||
    }
 | 
			
		||||
  </script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -56,6 +56,4 @@ Additional Information
 | 
			
		||||
If you still can't find what you're looking for, try in one of the following pages:
 | 
			
		||||
 | 
			
		||||
* :ref:`genindex`
 | 
			
		||||
* :ref:`modindex`
 | 
			
		||||
* :ref:`search`
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user