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/?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 1fb01986..6ef12d6d 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 c0765098..829f989a 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.

\n); } - $output .= qq(

Toggle useless messages

); + $output .= qq(

); $output .= sprintf qq(

View this report as an mbox folder, ). qq(status mbox, maintainer mbox

\n), html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes'})),