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"
|
||||
offTheRecord: false
|
||||
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
|
||||
return "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
|
||||
}
|
||||
|
|
|
@ -71,7 +71,25 @@ PopupMenu {
|
|||
}
|
||||
|
||||
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"
|
||||
onTriggered: {
|
||||
appSettings.devToolsEnabled = !appSettings.devToolsEnabled
|
||||
|
|
|
@ -92,6 +92,7 @@ ApplicationWindow {
|
|||
property bool webRTCPublicInterfacesOnly: false
|
||||
property bool devToolsEnabled: false
|
||||
property bool pdfViewerEnabled: true
|
||||
property bool compatibilityMode: true
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
Loading…
Reference in New Issue