help3xsl/help.js              |    4 ----
 help3xsl/online_transform.xsl |   12 +++++++-----
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 8e9d43a7d1d12b7e9dcfbf8b54b8d50b0cba7b78
Author:     Olivier Hallot <[email protected]>
AuthorDate: Thu Jan 9 12:58:25 2025 -0300
Commit:     Olivier Hallot <[email protected]>
CommitDate: Fri Jan 10 12:31:09 2025 +0100

    Simpler solution for no javascript browsers.
    
    Avoid previous flashing warning
    
    Special thanks to Christian Lohmaier for the tip.
    
    Change-Id: Iead34d14f12c5f670645adbcf28f4ab96d625477
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/180024
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <[email protected]>

diff --git a/help3xsl/help.js b/help3xsl/help.js
index 5f8485d5b3..8e0dc54206 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -7,10 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-// Javascript is available? If not, display warning block
-let h = document.getElementById("WarnJS");
-h.style.display = "none";
-
 // Pagination and bookmark search
 var url = window.location.pathname;
 var moduleRegex = new RegExp('text\/(\w+)\/');
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 72fcd5822e..e869486411 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -229,11 +229,13 @@
         </div>
     </div>
     <div id="DisplayArea" itemprop="softwareHelp" itemscope="true" 
itemtype="http://schema.org/SoftwareApplication";>
-        <div id="WarnJS">
-            <h1 dir="auto">
-            <xsl:call-template name="brand"><xsl:with-param 
name="string"><xsl:value-of 
select="$tmp_doc_ui//variable[@id='noscriptmsg']"/></xsl:with-param></xsl:call-template>
-            </h1>
-        </div>
+        <noscript>
+            <div id="WarnJS">
+                <h1 dir="auto">
+                <xsl:call-template name="brand"><xsl:with-param 
name="string"><xsl:value-of 
select="$tmp_doc_ui//variable[@id='noscriptmsg']"/></xsl:with-param></xsl:call-template>
+                </h1>
+            </div>
+        </noscript>
         <xsl:if test="$online">
             <xsl:if test="$xapian='yes'">
                 <div class="xapian-omega-search">

Reply via email to