From 2453d0e60087b982c4ce9636eea007a56041587a Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 13 Aug 2022 09:32:50 +0200 Subject: [PATCH] firefox: add a userContent.css --- dotfiles/firefox.css | 23 +++++++++++++++++++++++ dotfiles/firefox.js | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 dotfiles/firefox.css diff --git a/dotfiles/firefox.css b/dotfiles/firefox.css new file mode 100644 index 0000000..cc5ab77 --- /dev/null +++ b/dotfiles/firefox.css @@ -0,0 +1,23 @@ +/* To be symlinked in Firefox profile as chrome/userContent.css */ + +@-moz-document domain(twitter.com) { + html { + scroll-snap-type: y mandatory !important; + } + + /* Tweets in the timeline are
elements */ + article { + scroll-snap-align: start !important; + } + + /* Un-stick the sticky header and make it “snappable” as well */ + [aria-label="Home timeline"] > :first-child { + position: static !important; + scroll-snap-align: start !important; + } + + /* Hide the “new Tweets available” floating toast notification */ + [aria-label="New Tweets are available."] { + display: none !important; + } +} diff --git a/dotfiles/firefox.js b/dotfiles/firefox.js index a7ef191..434f40d 100644 --- a/dotfiles/firefox.js +++ b/dotfiles/firefox.js @@ -79,3 +79,6 @@ user_pref("browser.safebrowsing.malware.enabled", false); // Don't trim URLs user_pref("browser.urlbar.trimURLs", false); + +// Enable userContent.css +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);