[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH debbugs] Fix invalid CSS selector. Use querySelectorAll() instead of a manual reimplementation



The equally invalid 
  #status_mask {
    filter: alpha(opacity=0);
  }
which yields, in Firefox
  Expected 'none', URL, or filter function but found 'alpha('.
  Error in parsing value for 'filter'.  Declaration dropped.
remains, since I'm not sure what it was supposed to mean.
---
Please keep me in CC, as I'm not subscribed.

 html/bugs.css                    |  4 ++--
 templates/en_US/cgi/bugreport.tx | 11 +++--------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/html/bugs.css b/html/bugs.css
index 7bddb10..b6db5be 100644
--- a/html/bugs.css
+++ b/html/bugs.css
@@ -139,8 +139,8 @@ div.headers img {
 }
 
 span.headerfield { 
-  font-weight: bold
- };
+    font-weight: bold
+}
 
 pre.mime {
     font-family: monospace;
diff --git a/templates/en_US/cgi/bugreport.tx b/templates/en_US/cgi/bugreport.tx
index 6e7fef4..475632f 100644
--- a/templates/en_US/cgi/bugreport.tx
+++ b/templates/en_US/cgi/bugreport.tx
@@ -4,14 +4,9 @@
 <!--
 function toggle_infmessages()
 {
-        allDivs=document.getElementsByTagName("div");
-        for (var i = 0 ; i < allDivs.length ; i++ )
-       {
-                if (allDivs[i].className == "infmessage")
-                {
-                        allDivs[i].style.display=(allDivs[i].style.display == 'none' | allDivs[i].style.display == '') ? 'block' : 'none';
-                }
-       }
+        document.querySelectorAll("div.infmessage").forEach(function(div) {
+                div.style.display = div.style.display == "block" ? "none" : "block";
+        })
 }
 -->
 </script>
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature


Reply to: