From 2681568f2b1278b4265b9c46b87e9583145facaa Mon Sep 17 00:00:00 2001 From: Joshua Fern Date: Mon, 9 Mar 2020 06:39:37 +0000 Subject: [PATCH] firefox: support user content CSS The `userContent.css` file is similar to `userChrome.css`, it's a CSS file that you can use to change the way web sites and e-mails look. See http://kb.mozillazine.org/index.php?title=UserContent.css PR #1079 --- modules/programs/firefox.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index 17c64752..7f2367eb 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -137,7 +137,7 @@ in userChrome = mkOption { type = types.lines; default = ""; - description = "Custom Firefox CSS."; + description = "Custom Firefox user chrome CSS."; example = '' /* Hide tab bar in FF Quantum */ @-moz-document url("chrome://browser/content/browser.xul") { @@ -153,6 +153,16 @@ in ''; }; + userContent = mkOption { + type = types.lines; + default = ""; + description = "Custom Firefox user content CSS."; + example = '' + /* Hide scrollbar in FF Quantum */ + *{scrollbar-width:none !important} + ''; + }; + path = mkOption { type = types.str; default = name; @@ -295,6 +305,11 @@ in text = profile.userChrome; }; + "${profilesPath}/${profile.path}/chrome/userContent.css" = + mkIf (profile.userContent != "") { + text = profile.userContent; + }; + "${profilesPath}/${profile.path}/user.js" = mkIf (profile.settings != {} || profile.extraConfig != "") { text = mkUserJs profile.settings profile.extraConfig;