parent
816b8aaa00
commit
467b9a7d4a
|
|
@ -2770,6 +2770,7 @@ Valid values:
|
||||||
|
|
||||||
* +ua-google+
|
* +ua-google+
|
||||||
* +ua-googledocs+
|
* +ua-googledocs+
|
||||||
|
* +ua-gnome-gitlab+
|
||||||
* +js-whatsapp-web+
|
* +js-whatsapp-web+
|
||||||
* +js-discord+
|
* +js-discord+
|
||||||
* +js-string-replaceall+
|
* +js-string-replaceall+
|
||||||
|
|
|
||||||
|
|
@ -508,6 +508,20 @@ def _init_site_specific_quirks():
|
||||||
# "Safari/{webkit_version}")
|
# "Safari/{webkit_version}")
|
||||||
firefox_ua = "Mozilla/5.0 ({os_info}; rv:136.0) Gecko/20100101 Firefox/139.0"
|
firefox_ua = "Mozilla/5.0 ({os_info}; rv:136.0) Gecko/20100101 Firefox/139.0"
|
||||||
|
|
||||||
|
# Needed for gitlab.gnome.org which blocks old Chromium versions outright,
|
||||||
|
# except when QtWebEngine/... is in the UA.
|
||||||
|
#
|
||||||
|
# We could further modify the UA to just "qutebrowser" or something so we don't get
|
||||||
|
# Anubis at all, but it looks like their Anubis triggers to more than just
|
||||||
|
# Mozilla/5.0 (also AppleWebKit/... and Chromium/... possibly?), so at that point
|
||||||
|
# I'm not sure if we can strip down the UA so much without breaking
|
||||||
|
# something in GitLab as well.
|
||||||
|
not_mozilla_ua = (
|
||||||
|
"Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) "
|
||||||
|
"{qt_key}/{qt_version} {upstream_browser_key}/{upstream_browser_version_short} "
|
||||||
|
"Safari/{webkit_version}"
|
||||||
|
)
|
||||||
|
|
||||||
def maybe_newer_chrome_ua(at_least_version):
|
def maybe_newer_chrome_ua(at_least_version):
|
||||||
"""Return a new UA if our current chrome version isn't at least at_least_version."""
|
"""Return a new UA if our current chrome version isn't at least at_least_version."""
|
||||||
current_chome_version = version.qtwebengine_versions().chromium_major
|
current_chome_version = version.qtwebengine_versions().chromium_major
|
||||||
|
|
@ -528,6 +542,7 @@ def _init_site_specific_quirks():
|
||||||
# to keep your account secure" error.
|
# to keep your account secure" error.
|
||||||
# https://github.com/qutebrowser/qutebrowser/issues/5182
|
# https://github.com/qutebrowser/qutebrowser/issues/5182
|
||||||
("ua-google", "https://accounts.google.com/*", firefox_ua),
|
("ua-google", "https://accounts.google.com/*", firefox_ua),
|
||||||
|
("ua-gnome-gitlab", "https://gitlab.gnome.org/*", not_mozilla_ua),
|
||||||
]
|
]
|
||||||
|
|
||||||
for name, pattern, ua in user_agents:
|
for name, pattern, ua in user_agents:
|
||||||
|
|
|
||||||
|
|
@ -658,6 +658,7 @@ content.site_specific_quirks.skip:
|
||||||
valid_values:
|
valid_values:
|
||||||
- ua-google
|
- ua-google
|
||||||
- ua-googledocs
|
- ua-googledocs
|
||||||
|
- ua-gnome-gitlab
|
||||||
- js-whatsapp-web
|
- js-whatsapp-web
|
||||||
- js-discord
|
- js-discord
|
||||||
- js-string-replaceall
|
- js-string-replaceall
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue