diff --git a/README.md b/README.md index 59cd06b..265bf88 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,10 @@ Browsers get the same thing but this time without "blink": 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 relevant directories. If you hate systemd; `middleclick-autoscroll apply` does the same thing manually. diff --git a/doc/middleclick-autoscroll.1.scd b/doc/middleclick-autoscroll.1.scd index a1fef5d..54e6808 100644 --- a/doc/middleclick-autoscroll.1.scd +++ b/doc/middleclick-autoscroll.1.scd @@ -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 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 -older Chromium, such as Steam's CEF, has no such bar to show anyway. Helium -knows the feature under a name of its own and is asked for -*HeliumMiddleClickAutoscroll* as well; a name a browser does not know is -ignored. It works on any distribution: +older Chromium, such as Steam's CEF, has no such bar to show anyway. Two +browsers know the feature under a name of their own and ignore Chromium's: +Helium, which is asked for *HeliumMiddleClickAutoscroll* as well, and Brave, +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 assumed from where the launcher came from. diff --git a/src/lib/common.sh b/src/lib/common.sh index 9bc3805..c7833a6 100644 --- a/src/lib/common.sh +++ b/src/lib/common.sh @@ -35,15 +35,19 @@ MCA_PRETTY="Middle-Click Autoscroll" # the one that always works. MCA_FLAG="--enable-blink-features=MiddleClickAutoscroll" -# Helium ships the feature under its own name and does not answer to the -# Chromium one, so browsers are asked for both. 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" +# Two browsers do not answer to the Chromium name. Helium ships the feature +# under its own name and sets the runtime flag from that alone. Brave takes +# the generated feature away and switches the flag on from one of its own, +# 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 # (or the user) already carries, and for taking them back out again. 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. # 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 # 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_LOCALEDIR="${MCA_LOCALEDIR:-@LOCALEDIR@}"