fix: keep the unsupported-flag warning off browsers
--enable-blink-features is on the list of flags Chromium warns about, so every browser the flag was applied to put a yellow "unsupported command-line flag" bar above each page. Browsers are given --enable-features=MiddleClickAutoscroll instead. It asks for the same thing - Blink generates a feature of the same name for each of its runtime flags - and is not on that list. That spelling only works from Chromium 124 onwards, so everything else keeps the flag that works everywhere: an application embedding an older Chromium, Steam's CEF among them, has no such bar to show anyway. Helium knows the feature under a name of its own and ignores the Chromium one, so browsers are asked for HeliumMiddleClickAutoscroll as well; autoscroll never worked there before. A name a browser does not know is ignored, which is what makes one list safe for all of them. An installation set up by an earlier version is taken back and written again once, because a file that is already marked as patched would otherwise be left alone with the old flag in it.
This commit is contained in:
1 parent
d8900ef80f
commit
fa624380b1
6 files changed
+173
-49
No files matched your search
@@ -101,6 +101,19 @@ flag turns it on:
|
||||
But doing that for every app is kinda bothersome and it also might break with updates.
|
||||
That's why I created this small tool to automate that.
|
||||
|
||||
Browsers get the same thing asked for differently:
|
||||
|
||||
--enable-features=MiddleClickAutoscroll
|
||||
|
||||
Both mean the same feature - Blink generates a matching feature name for each of
|
||||
its runtime flags - but the first one is on Chromium's list of flags worth
|
||||
warning about, so a browser started with it shows a yellow "unsupported
|
||||
command-line flag" bar over every page. The second one is not on that list, so
|
||||
there's no bar. It only works from Chromium 124 on, which is why apps that
|
||||
embed something older (Steam's CEF, older Electron) keep the first one - they
|
||||
have no such bar to begin with. Helium, which carries the feature under its own
|
||||
name, is asked for `HeliumMiddleClickAutoscroll` alongside it.
|
||||
|
||||
New apps are picked up by a systemd path unit that watches the
|
||||
relevant directories. Without systemd, `middleclick-autoscroll apply` does the
|
||||
same thing manually.
|
||||
|
||||
Reference in new issue
Block a user