fix: stop any loading webpage before changing the user agent
This commit is contained in:
parent
6b064f3d17
commit
94274ff495
|
@ -216,7 +216,7 @@ Rectangle {
|
||||||
storageName: "Profile"
|
storageName: "Profile"
|
||||||
offTheRecord: false
|
offTheRecord: false
|
||||||
httpUserAgent: {
|
httpUserAgent: {
|
||||||
if (browserHeader.browserSettings.compatibilityMode) {
|
if (appSettings.compatibilityMode) {
|
||||||
// Google doesn't let you connect if the user agent is Chrome-ish and doesn't satisfy some sort of hidden requirement
|
// 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 "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,25 @@ PopupMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("Developper Tools")
|
text: qsTr("Compatibility mode")
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
onToggled: {
|
||||||
|
for (let i = 0; i < tabs.count; ++i){
|
||||||
|
tabs.getTab(i).item.stop(); // Stop all loading tabs
|
||||||
|
}
|
||||||
|
|
||||||
|
appSettings.compatibilityMode = checked;
|
||||||
|
|
||||||
|
for (let i = 0; i < tabs.count; ++i){
|
||||||
|
tabs.getTab(i).item.reload(); // Reload them with new user agent
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Action {
|
||||||
|
text: qsTr("Developer Tools")
|
||||||
shortcut: "F12"
|
shortcut: "F12"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
appSettings.devToolsEnabled = !appSettings.devToolsEnabled
|
appSettings.devToolsEnabled = !appSettings.devToolsEnabled
|
||||||
|
|
|
@ -92,6 +92,7 @@ ApplicationWindow {
|
||||||
property bool webRTCPublicInterfacesOnly: false
|
property bool webRTCPublicInterfacesOnly: false
|
||||||
property bool devToolsEnabled: false
|
property bool devToolsEnabled: false
|
||||||
property bool pdfViewerEnabled: true
|
property bool pdfViewerEnabled: true
|
||||||
|
property bool compatibilityMode: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
Loading…
Reference in New Issue