Add site-specific quirk for Digitec/Galaxus madness
This commit is contained in:
parent
2f20e3b60b
commit
c4d8502872
|
|
@ -45,6 +45,8 @@ Fixed
|
|||
error is shown instead).
|
||||
- The default user agent now only contains the shortened Chromium version
|
||||
number, which fixes overzealous blocking on ScienceDirect.
|
||||
- New site-specific quirk to fix existing accounts showing as non-existant on
|
||||
Digitec/Galaxus.
|
||||
- Resolved issues in userscripts:
|
||||
* `qute-bitwarden` will now prompt a re-login if its cached session has
|
||||
been invalidated since last used. (#8456)
|
||||
|
|
|
|||
|
|
@ -2773,6 +2773,7 @@ Valid values:
|
|||
* +ua-google+
|
||||
* +ua-slack+
|
||||
* +ua-googledocs+
|
||||
* +ua-digitecgalaxus+
|
||||
* +js-whatsapp-web+
|
||||
* +js-discord+
|
||||
* +js-string-replaceall+
|
||||
|
|
|
|||
|
|
@ -1201,6 +1201,11 @@ class _WebEngineScripts(QObject):
|
|||
# will be an UA quirk once we set the JS UA as well
|
||||
name='ua-googledocs',
|
||||
),
|
||||
_Quirk(
|
||||
'digitecgalaxus',
|
||||
# will be an UA quirk once we set the JS UA as well
|
||||
name='ua-digitecgalaxus',
|
||||
),
|
||||
|
||||
_Quirk(
|
||||
'string_replaceall',
|
||||
|
|
|
|||
|
|
@ -660,6 +660,7 @@ content.site_specific_quirks.skip:
|
|||
- ua-google
|
||||
- ua-slack
|
||||
- ua-googledocs
|
||||
- ua-digitecgalaxus
|
||||
- js-whatsapp-web
|
||||
- js-discord
|
||||
- js-string-replaceall
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
// ==UserScript==
|
||||
// @include https://id.digitecgalaxus.ch/*
|
||||
// @include https://id.galaxus.eu/*
|
||||
// ==/UserScript==
|
||||
|
||||
// Needed because their /api/v1/login/_actions/find-user endpoint claims
|
||||
// that the user does not exist (!?) with the default UA
|
||||
|
||||
"use strict";
|
||||
|
||||
const originalUserAgent = navigator.userAgent;
|
||||
|
||||
Object.defineProperty(navigator, "userAgent", {
|
||||
get() {
|
||||
return originalUserAgent.replace(/QtWebEngine\/[\d.]+ /, "");
|
||||
},
|
||||
});
|
||||
Loading…
Reference in New Issue