texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Wed, 30 Nov 2022 13:36:41 -0500 (EST)

branch: old/qt-info
commit 775539107d9df91471989382f78f0b6b288b1450
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Apr 13 12:08:39 2019 +0100

    remove short table of contents
---
 js/info.js | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/js/info.js b/js/info.js
index d329fe9f87..640708157f 100644
--- a/js/info.js
+++ b/js/info.js
@@ -728,6 +728,17 @@ var user_config = window["INFO_CONFIG"];
 
       /* Remove table of contents header.  */
       document.querySelector (".contents-heading").remove ();
+
+      /* Also remove any short table of contents.  Links therein would
+         go to the table of contents, which we have just removed. */
+      function maybe_remove (query)
+        {
+          var element = document.querySelector (query);
+          if (element)
+            element.remove ();
+        }
+      maybe_remove (".shortcontents-heading");
+      maybe_remove (".shortcontents");
     }
 
     /* Render 'sidebar' according to STATE which is a new state. */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]