From: Paul Wise
Date: Sun, 13 Nov 2022 03:09:43 +0000 (+0800)
Subject: Use a checkbox and CSS to show info messages instead of JavaScript
X-Git-Url: https://git.donarmstrong.com/debbugs.git?a=commitdiff_plain;h=c9b45a57d271359800a633e03d389b3d1fb7514d;p=debbugs.git
Use a checkbox and CSS to show info messages instead of JavaScript
This works in browsers where users have disabled JavaScript,
such as the Tor Browser in the Security Level called Safest.
Obsoletes: https://salsa.debian.org/debbugs-team/debbugs/-/merge_requests/9
---
diff --git a/html/bugs.css b/html/bugs.css
index 1fb0198..6ef12d6 100644
--- a/html/bugs.css
+++ b/html/bugs.css
@@ -170,6 +170,11 @@ pre.mime {
color: #797979;
}
+/* Show info messages when uselessmessages is checked */
+#uselessmessages:checked ~ .infmessage {
+ display: block;
+}
+
/* This must be separate from the other CSS to make the showing of
unimportant messages work in bugreport.cgi. */
.infmessage { display: none; }
diff --git a/templates/en_US/cgi/bugreport.tmpl b/templates/en_US/cgi/bugreport.tmpl
index c076509..829f989 100644
--- a/templates/en_US/cgi/bugreport.tmpl
+++ b/templates/en_US/cgi/bugreport.tmpl
@@ -33,7 +33,7 @@ function toggle_infmessages()
qq(or subscribe ).
qq(to this bug.