mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 20:40:18 +00:00
fix: change user agent to Firefox on google to enable loging in
This commit is contained in:
parent
03769fbb6e
commit
803b287766
@ -101,27 +101,27 @@ Rectangle {
|
||||
}
|
||||
|
||||
StyledButton {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
label: qsTr("Allow")
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
label: qsTr("Allow")
|
||||
onClicked: {
|
||||
postMessage(true);
|
||||
accessDialog.close();
|
||||
accessDialog.close();
|
||||
}
|
||||
}
|
||||
|
||||
StyledButton {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
label: qsTr("Deny")
|
||||
StyledButton {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
label: qsTr("Deny")
|
||||
onClicked: {
|
||||
postMessage(false);
|
||||
accessDialog.close();
|
||||
}
|
||||
accessDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,6 +251,13 @@ Rectangle {
|
||||
property QtObject defaultProfile: WebEngineProfile {
|
||||
storageName: "Profile"
|
||||
offTheRecord: false
|
||||
httpUserAgent: {
|
||||
if (addressBar.text.indexOf("google.") > -1) {
|
||||
// Google doesn't let you connect if the user agent is Chrome-ish and doesn't satisfy some sort of hidden requirement
|
||||
return "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
useForGlobalCertificateVerification: true
|
||||
userScripts: [
|
||||
WebEngineScript {
|
||||
@ -264,6 +271,7 @@ Rectangle {
|
||||
property QtObject otrProfile: WebEngineProfile {
|
||||
offTheRecord: true
|
||||
persistentCookiesPolicy: WebEngineProfile.NoPersistentCookies
|
||||
httpUserAgent: defaultProfile.httpUserAgent
|
||||
userScripts: [
|
||||
WebEngineScript {
|
||||
injectionPoint: WebEngineScript.DocumentCreation
|
||||
|
Loading…
x
Reference in New Issue
Block a user