fix: pass Brave's autoscroll feature name to browsers

This commit is contained in:
Felitendo committed 2026-09-15 19:01:01 +02:00
1 parent b97ccf0379
commit a992efb0cb
3 files changed
+22 -10

No files matched your search

+4
View File
@@ -113,6 +113,10 @@ Browsers get the same thing but this time without "blink":
But both do the same ¯\_(ツ)_/¯ But both do the same ¯\_(ツ)_/¯
Except in Helium and Brave, which have their own names for it
(`HeliumMiddleClickAutoscroll`, and Brave's is actually spelled
`MiddelButtonClickAutoscroll`), so browsers get those as well.
New apps are picked up by a systemd path unit that watches the New apps are picked up by a systemd path unit that watches the
relevant directories. If you hate systemd; `middleclick-autoscroll apply` does the relevant directories. If you hate systemd; `middleclick-autoscroll apply` does the
same thing manually. same thing manually.
+5 -4
View File
@@ -26,10 +26,11 @@ runtime flags - but it is not on the list of flags Chromium warns about, so the
browser does not put a bar reading "You are using an unsupported command-line browser does not put a bar reading "You are using an unsupported command-line
flag" above every page. That spelling only works from Chromium 124 onwards, flag" above every page. That spelling only works from Chromium 124 onwards,
which is why everything else keeps the first one: an application that embeds an which is why everything else keeps the first one: an application that embeds an
older Chromium, such as Steam's CEF, has no such bar to show anyway. Helium older Chromium, such as Steam's CEF, has no such bar to show anyway. Two
knows the feature under a name of its own and is asked for browsers know the feature under a name of their own and ignore Chromium's:
*HeliumMiddleClickAutoscroll* as well; a name a browser does not know is Helium, which is asked for *HeliumMiddleClickAutoscroll* as well, and Brave,
ignored. It works on any distribution: which is asked for *MiddelButtonClickAutoscroll* - spelled the way Brave spells
it. A name a browser does not know is ignored. It works on any distribution:
which of the routes below an application takes is read off its launcher, not which of the routes below an application takes is read off its launcher, not
assumed from where the launcher came from. assumed from where the launcher came from.
+13 -6
View File
@@ -35,15 +35,19 @@ MCA_PRETTY="Middle-Click Autoscroll"
# the one that always works. # the one that always works.
MCA_FLAG="--enable-blink-features=MiddleClickAutoscroll" MCA_FLAG="--enable-blink-features=MiddleClickAutoscroll"
# Helium ships the feature under its own name and does not answer to the # Two browsers do not answer to the Chromium name. Helium ships the feature
# Chromium one, so browsers are asked for both. A name a browser does not know # under its own name and sets the runtime flag from that alone. Brave takes
# is ignored, which is what makes one list safe to hand to all of them. # the generated feature away and switches the flag on from one of its own,
MCA_BROWSER_FLAG="--enable-features=MiddleClickAutoscroll,HeliumMiddleClickAutoscroll" # spelled MiddelButtonClickAutoscroll - the typo is in Brave's source, and the
# correct spelling does nothing. So browsers are asked for all three. A name a
# browser does not know is ignored, which is what makes one list safe to hand
# to all of them.
MCA_BROWSER_FLAG="--enable-features=MiddleClickAutoscroll,HeliumMiddleClickAutoscroll,MiddelButtonClickAutoscroll"
# The feature names on their own, for merging into a list that an application # The feature names on their own, for merging into a list that an application
# (or the user) already carries, and for taking them back out again. # (or the user) already carries, and for taking them back out again.
MCA_FEATURE="MiddleClickAutoscroll" MCA_FEATURE="MiddleClickAutoscroll"
MCA_BROWSER_FEATURES="MiddleClickAutoscroll,HeliumMiddleClickAutoscroll" MCA_BROWSER_FEATURES="MiddleClickAutoscroll,HeliumMiddleClickAutoscroll,MiddelButtonClickAutoscroll"
# Bumped when the flags above change, and when what gets written where does. # Bumped when the flags above change, and when what gets written where does.
# An installation that was set up by a version with a different answer is taken # An installation that was set up by a version with a different answer is taken
@@ -52,7 +56,10 @@ MCA_BROWSER_FEATURES="MiddleClickAutoscroll,HeliumMiddleClickAutoscroll"
# #
# 3 is what takes -noverifyfiles back out of the Steam entries an older version # 3 is what takes -noverifyfiles back out of the Steam entries an older version
# put it in. # put it in.
MCA_FLAG_SCHEME=3 #
# 4 adds Brave's name to the browser list, which an entry edited in place would
# otherwise never get.
MCA_FLAG_SCHEME=4
MCA_LIBDIR="${MCA_LIBDIR:-@LIBDIR@}" MCA_LIBDIR="${MCA_LIBDIR:-@LIBDIR@}"
MCA_LOCALEDIR="${MCA_LOCALEDIR:-@LOCALEDIR@}" MCA_LOCALEDIR="${MCA_LOCALEDIR:-@LOCALEDIR@}"