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:37 -0500 (EST)

branch: old/qt-info
commit c753b0f0425f1ce5f7478581d5d27277c602a77d
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Apr 10 16:38:11 2019 +0100

    Reduce ambiguity of "index".
    
    (config) <INDEX_NAME>: Rename to TOP_NAME.
    <INDEX_ID>: Rename to TOP_ID.
    (init_index_page, init_top_page): Rename.
    (inside_index_page, inside_top_page): Rename variable.
    (on_load, Pages, Sidebar, resolve_page)
    (top-level initialization code):
    Comments and variable names changed to refer to "top" instead of
    "index".
    
    This tries to leave the word "index" used for the indices of the
    manual only.
---
 ChangeLog  |  3 ++-
 js/info.js | 16 ++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cfd4d42e46..d96f6da914 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,7 +6,8 @@
        <INDEX_ID>: Rename to TOP_ID.
        (init_index_page, init_top_page): Rename.
        (inside_index_page, inside_top_page): Rename variable.
-       (on_load, Pages):
+       (on_load, Pages, Sidebar, resolve_page)
+       (top-level initialization code):
        Comments and variable names changed to refer to "top" instead of 
        "index".
 
diff --git a/js/info.js b/js/info.js
index 7078faa6a1..778f7df317 100644
--- a/js/info.js
+++ b/js/info.js
@@ -701,7 +701,7 @@
       toc.remove ();
 
       /* Move contents of <body> into a a fresh <div> to let the components
-         treat the index page like other iframe page.  */
+         treat the top page like other iframe page.  */
       var nav = document.createElement ("nav");
       nav.classList.add ("contents");
       for (var ch = toc.firstChild; ch; ch = toc.firstChild)
@@ -882,13 +882,13 @@
           throw new ReferenceError (msg);
         }
 
-      /* Create iframe if necessary unless the div is refering to the Index
+      /* Create iframe if necessary unless the div is refering to the top
          page.  */
       if ((pageid === config.TOP_ID) && visible)
         {
           div.removeAttribute ("hidden");
           /* Unlike iframes, Elements are unlikely to be scrollable (CSSOM
-             Scroll-behavior), so choose an arbitrary element inside "index"
+             Scroll-behavior), so choose an arbitrary element inside "top"
              div and at the top of it.  */
           document.getElementById ("icon-bar").scrollIntoView ();
         }
@@ -1964,7 +1964,7 @@
   /** Depending on the role of the document launching this script, different
       event handlers are registered.  This script can be used in the context 
of:
 
-      - the index page of the manual which manages the state of the application
+      - the top page of the manual which manages the state of the application
       - the iframe which contains the lateral table of content
       - other iframes which contain other pages of the manual
 
@@ -2042,15 +2042,15 @@
       };
 
       store = new Store (updater, initial_state);
-      var index = init_top_page ();
+      var top_page = init_top_page ();
       var sidebar = init_sidebar ();
       window.addEventListener ("DOMContentLoaded", function () {
-        index.on_load ();
+        top_page.on_load ();
         sidebar.on_load ();
       }, false);
-      window.addEventListener ("message", index.on_message, false);
+      window.addEventListener ("message", top_page.on_message, false);
       window.addEventListener ("message", sidebar.on_message, false);
-      window.onpopstate = index.on_popstate;
+      window.onpopstate = top_page.on_popstate;
     }
   else if (inside_iframe)
     {



reply via email to

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