about summary refs log tree commit diff
path: root/modules/nixfiles/firefox/userContent.css
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-10-24 02:22:33 +0300
committerAzat Bahawi <azat@bahawi.net>2022-10-24 02:25:16 +0300
commitadc939d83de610bec490af075d3ef46c10ee03e8 (patch)
treef73e5479d7e4c9799789adbae74239680716205b /modules/nixfiles/firefox/userContent.css
parent2022-10-20 (diff)
2022-10-24
Diffstat (limited to '')
-rw-r--r--modules/nixfiles/firefox/userContent.css78
1 files changed, 57 insertions, 21 deletions
diff --git a/modules/nixfiles/firefox/userContent.css b/modules/nixfiles/firefox/userContent.css
index ff74e01..3f6894b 100644
--- a/modules/nixfiles/firefox/userContent.css
+++ b/modules/nixfiles/firefox/userContent.css
@@ -24,7 +24,34 @@
 }
 
 @-moz-document regexp("https?:\/\/(.*\.)?github.com.*") {
-    .footer {
+    /*
+     * Remove useless information, links, sponsorship buttons from which GitHub
+     * gets a cut, useless "social" stuff and other "features". Unfortunately, I
+     * cannot disable reactions because a lot of repositories use these as a
+     * certain indicator of something, or as a voting tool.
+     */
+    #org-repo-pin-select-menu,
+    #sponsor-button,
+    .dropdown-divider,
+    .footer,
+    .octicon.octicon-info,
+    .pt-3.mt-3.d-none.d-md-block, /* Profile achievements. */
+    .details-overlay.details-reset.position-relative.d-block, /* Add file button. */
+    .starring-container,
+    .user-profile-link,
+    .user-status-circle-badge-container,
+    .user-status-container,
+    a[href^="/account/choose?action=upgrade"],
+    a[href^="/codespaces"],
+    a[href^="/collections"],
+    a[href^="/events"],
+    a[href^="/explore"],
+    a[href^="/marketplace"],
+    a[href^="/organizations/enterprise"],
+    a[href^="/sponsors"],
+    a[href^="/topics"],
+    a[href^="/trending"],
+    get-repo /* Find files button. */ {
         display: none !important;
     }
 
@@ -39,7 +66,17 @@
     }
 }
 
-@-moz-document regexp("https?:\/\/.*(stack(exchange|overflow)|askubuntu|superuser|serverfault)\.com.*") {
+@-moz-document regexp("https?:\/\/github.com/?") {
+    /*
+     * Remove the stupid GitHub news and updates page if I ever click that by
+     * accident.
+     */
+    .application-main {
+        display: none !important;
+    }
+}
+
+@-moz-document regexp("https?:\/\/.*(stack(exchange|overflow)|askubuntu|superuser|serverfault)\.com\/questions\/.*") {
     html,
     body {
         --ff-mono: var(--monospace-font-family) !important;
@@ -47,6 +84,13 @@
         --ff-serif: var(--serif-font-family) !important;
     }
 
+    /*
+     * This removes all bloat and useless information from Q/A pages. Since I
+     * usually find these through a search engine all of the navigation buttons
+     * and such are removed. I don't want to see any dumb messages, user names
+     * and promos. Comments on answers are kept because they sometimes have
+     * useful information but usernames and metadata is omitted.
+     */
     #announcement-banner,
     #footer,
     #left-sidebar,
@@ -103,6 +147,11 @@
 }
 
 @-moz-document regexp("https:\/\/habr\.com\/(ru|en)\/(article|company\/.*\/blog|post)\/.*") {
+    /*
+     * Remove everything and keep only the meat and potatoes of the article. I'm
+     * espeically not interested in comments or "witty" remarks of users this
+     * website's users.
+     */
     .Vue-Toastification__container,
     .tm-article-presenter__footer,
     .tm-article-presenter__meta,
@@ -127,6 +176,9 @@
         display: none !important;
     }
 
+    /*
+     * Remove all animations.
+     */
     * {
         transition: none !important;
     }
@@ -168,13 +220,6 @@
     }
 }
 
-@-moz-document regexp("https?:\/\/search\.nixos\.org.*") {
-    .search-sidebar,
-    footer.container {
-        display: none !important;
-    }
-}
-
 @-moz-document regexp("https?:\/\/gog.com.*") {
     .galaxy-section-wrapper {
         display: none !important;
@@ -188,6 +233,9 @@
 }
 
 @-moz-document regexp("https:\/\/\.*\.hh\.ru.*") {
+    /*
+     * Doing my best here to avoid the "work" of this company's webdevs.
+     */
     .HH-Supernova-Footer,
     .index-dashboard-applicant__banners,
     .notification-manager,
@@ -215,18 +263,6 @@
     }
 }
 
-@-moz-document regexp("https?:\/\/tabs\.ultimate-guitar\.com.*") {
-    #comments,
-    #shots,
-    a[rel*="noreferrer"],
-    a[target="_blank"],
-    div[class*="SiteWideBanner"],
-    footer,
-    iframe {
-        display: none !important;
-    }
-}
-
 @-moz-document regexp("https?:\/\/developer\.mozilla\.org.*") {
     .main-document-header-container.top-navigation {
         display: none !important;

Consider giving Nix/NixOS a try! <3