[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Mon, 7 Oct 2024 16:11:00 -0400 (EDT) |
branch: master
commit fd0987d9b06df46145426ef214b41932a94d7939
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Oct 6 20:13:56 2024 +0100
* js/info.js: add more debug statements
---
ChangeLog | 4 ++++
js/info.js | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0b444750c4..0407246d80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-06 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * js/info.js: add more debug statements
+
2024-10-06 Patrice Dumas <pertusus@free.fr>
* info/scan.c (match_in_match_list): add an indicatric variable such
diff --git a/js/info.js b/js/info.js
index 50bdbb8127..f08ecf4eba 100644
--- a/js/info.js
+++ b/js/info.js
@@ -272,6 +272,10 @@ updater (state, action)
linkid = (action.pointer) ?
state.loaded_nodes[action.pointer] : action.url;
+ debug (":linkid: " + linkid);
+ if (action.pointer)
+ debug (":pointer: " + action.pointer);
+
result.current = linkid;
result.section_hash = null;
result.history = action.history;
@@ -638,6 +642,7 @@ init_index_page ()
var linkid = this.data[this.input.value];
if (linkid)
{
+ debug ("Text input set linkid " + linkid);
hide_sidebar_if_narrow ();
store.dispatch (actions.set_current_url (linkid));
}
@@ -1453,10 +1458,14 @@ init_sidebar ()
/* Remove the hash part for the main page. */
var pageid = linkid_split (data.selected).pageid;
var selected = (pageid === config.INDEX_ID) ? pageid : data.selected;
+ debug ("sidebar - " + selected);
+
/* Highlight the current LINKID in the table of content. */
var elem = scan_toc (toc_div, selected, data.section_hash);
if (elem)
elem.scrollIntoView (true);
+ else
+ debug ("sidebar - no elem " + selected);
}
}