Bug 1630055 - Make the aboutAddonsExtra.css apply again. r=darktrojan DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Thu, 23 Apr 2020 21:29:40 +0300
changeset 38919 fa75d289eeb4fea42b63c6872a0c4391f0c73f70
parent 38918 e5f1a16870bf433173f464239e9068f7075ed9c1
child 38920 534231abf4b4367bb07b91632598bf1716497e97
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersdarktrojan
bugs1630055
Bug 1630055 - Make the aboutAddonsExtra.css apply again. r=darktrojan DONTBUILD
mail/base/content/aboutAddonsExtra.css
mail/base/content/aboutAddonsExtra.js
--- a/mail/base/content/aboutAddonsExtra.css
+++ b/mail/base/content/aboutAddonsExtra.css
@@ -3,31 +3,35 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 :root {
   --in-content-categories-background: #ebebef;
 }
 
 @media (prefers-color-scheme: dark) {
   :root {
-    --in-content-categories-background: rgba(249,249,250,0.1);
+    --in-content-categories-background: rgba(249, 249, 250, 0.1);
   }
 }
 
-#category-box {
+#sidebar {
   background-color: var(--in-content-categories-background);
 }
 
-#preferencesButton {
+/* Hide Plugins category */
+button[name="plugin"] {
+  display: none;
+}
+
+.sidebar-footer-list {
   margin-bottom: 36px;
 }
 
-.sidebar-footer-button.help-button {
+/* Hide the help button */
+#help-button {
   display: none;
 }
 
-#nav-header {
-  height: 50px;
-}
-
-#category-plugin {
+/* Hide in extension details the private browsing section */
+section > .addon-detail-row-private-browsing,
+.addon-detail-row-private-browsing + .addon-detail-row.addon-detail-help-row {
   display: none;
 }
--- a/mail/base/content/aboutAddonsExtra.js
+++ b/mail/base/content/aboutAddonsExtra.js
@@ -14,22 +14,16 @@ const THUNDERBIRD_THEME_PREVIEWS = new M
     "chrome://mozapps/content/extensions/firefox-compact-dark.svg",
   ],
 ]);
 
 /* This file runs in both the outer window, which controls the categories list, search bar, etc.,
  * and the inner window which is the list of add-ons or the detail view. */
 (async function() {
   if (window.location.href == "about:addons") {
-    let contentStylesheet = document.createProcessingInstruction(
-      "xml-stylesheet",
-      'href="chrome://messenger/content/aboutAddonsExtra.css" type="text/css"'
-    );
-    document.insertBefore(contentStylesheet, document.documentElement);
-
     // Fix the "Search on addons.mozilla.org" placeholder text in the searchbox.
     let browser = document.getElementById("html-view-browser");
     if (!/(interactive|complete)/.test(browser.contentDocument.readyState)) {
       await new Promise(resolve =>
         browser.contentWindow.addEventListener("DOMContentLoaded", resolve, {
           once: true,
         })
       );
@@ -47,16 +41,22 @@ const THUNDERBIRD_THEME_PREVIEWS = new M
     placeholder = placeholder.replace(
       "addons.mozilla.org",
       "addons.thunderbird.net"
     );
     textbox.setAttribute("placeholder", placeholder);
     return;
   }
 
+  let contentStylesheet = document.createProcessingInstruction(
+    "xml-stylesheet",
+    'href="chrome://messenger/content/aboutAddonsExtra.css" type="text/css"'
+  );
+  document.insertBefore(contentStylesheet, document.documentElement);
+
   window.isCorrectlySigned = function() {
     return true;
   };
 
   delete window.browserBundle;
   window.browserBundle = Services.strings.createBundle(
     "chrome://messenger/locale/addons.properties"
   );