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

branch: old/qt-info
commit c4423bc92bcfaf75b2bc444bf01428d730b6e6bc
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Apr 20 13:18:36 2019 +0100

    Make help optional.
    
    * js/info.js
    (config): New option 'embedded_help'.
    (add_icons): Do nothing unless this is set.
    (resolve_page): Remove code scrolling to icon bar.
---
 ChangeLog                    |  9 +++++++++
 js/docbrowser/mainwindow.cpp |  3 ++-
 js/info.js                   | 10 +++++-----
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 206d8d1567..925d6eaed6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-04-20  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Make help optional.
+       
+       * js/info.js
+       (config): New option 'embedded_help'.
+       (add_icons): Do nothing unless this is set.
+       (resolve_page): Remove code scrolling to icon bar.
+
 2019-04-20  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * js/info.css: Comment out overflow properties because of 
diff --git a/js/docbrowser/mainwindow.cpp b/js/docbrowser/mainwindow.cpp
index aa8275a23e..f4586e118c 100644
--- a/js/docbrowser/mainwindow.cpp
+++ b/js/docbrowser/mainwindow.cpp
@@ -119,7 +119,8 @@ R"(
 "use strict"; /* This must be the first thing in the script. */
 
 var INFO_CONFIG = {
-  show_welcome_message: false
+  show_welcome_message: false,
+  embedded_help: false,
 };
 )";
 
diff --git a/js/info.js b/js/info.js
index 80fa15bda0..1aacb96028 100644
--- a/js/info.js
+++ b/js/info.js
@@ -54,7 +54,8 @@ var user_config = window["INFO_CONFIG"];
           @type {(function (): void)} */
       on_iframe_load: null
     },
-    show_welcome_message: true
+    show_welcome_message: true,
+    embedded_help: true
   };
 
   /*-------------------.
@@ -921,10 +922,6 @@ var user_config = window["INFO_CONFIG"];
       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 "top"
-             div and at the top of it.  */
-          document.getElementById ("icon-bar").scrollIntoView ();
         }
       else
         {
@@ -1834,6 +1831,9 @@ var user_config = window["INFO_CONFIG"];
   function
   add_icons (document)
   {
+    if (!config.embedded_help)
+      return;
+
     var div = document.createElement ("div");
     div.setAttribute ("id", "icon-bar");
     div.setAttribute ("style", "float: right");



reply via email to

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