[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Sat, 5 Oct 2024 16:48:49 -0400 (EDT) |
branch: master
commit 59a7b5f922c7409a6a7f7cc6a151f8c6f94b4a52
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Oct 5 21:30:39 2024 +0100
* js/info.js (init_index_page, navigation_links): rename
"menu" variable and fields to "TI_menu" to mark it as a
Text_input object.
---
ChangeLog | 6 ++++++
js/info.js | 18 +++++++++---------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 355016aeeb..6abc56469f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-05 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * js/info.js (init_index_page, navigation_links): rename
+ "menu" variable and fields to "TI_menu" to mark it as a
+ Text_input object.
+
2024-10-05 Gavin Smith <gavinsmith0123@gmail.com>
* js/info.js: Exdent entire body of file (except inside a string
diff --git a/js/info.js b/js/info.js
index e3b7e4cf4c..dab3c3bbae 100644
--- a/js/info.js
+++ b/js/info.js
@@ -671,11 +671,11 @@ init_index_page ()
var elem = document.createElement ("div");
elem.classList.add ("text-input");
- var menu = new Text_input ("menu");
- menu.render = function (state) {
+ var TI_menu = new Text_input ("menu");
+ TI_menu.render = function (state) {
if (state.text_input === "menu")
{
- var current_menu = state.loaded_nodes[state.current].menu;
+ var current_menu = state.loaded_nodes[state.current].TI_menu;
if (current_menu)
this.show (current_menu);
else
@@ -700,7 +700,7 @@ init_index_page ()
this.show ();
};
- elem.appendChild (menu.element);
+ elem.appendChild (TI_menu.element);
elem.appendChild (index.element);
elem.appendChild (search.element);
@@ -710,7 +710,7 @@ init_index_page ()
elem.appendChild (warn$);
this.element = elem;
- this.menu = menu;
+ this.TI_menu = TI_menu;
this.index = index;
this.search = search;
this.warn = warn$;
@@ -736,14 +736,14 @@ init_index_page ()
if (!state.text_input || state.warning)
{
- this.menu.hide ();
+ this.TI_menu.hide ();
this.index.hide ();
this.search.hide ();
}
else
{
this.index.render (state);
- this.menu.render (state);
+ this.TI_menu.render (state);
this.search.render (state);
}
};
@@ -2012,8 +2012,8 @@ navigation_links (content)
}
else /* this link is part of local table of content. */
{
- res.menu = res.menu || {};
- res.menu[link.text] = href_hash (link_href (link));
+ res.TI_menu = res.TI_menu || {};
+ res.TI_menu[link.text] = href_hash (link_href (link));
}
}