From 95253b21607360e9de76742d67f71f2f0255a327 Mon Sep 17 00:00:00 2001 From: "aaron@nanu-c.org" Date: Mon, 8 Feb 2021 22:44:38 +0100 Subject: [PATCH] add captcha interceptor to MainQML, too --- guis/qml/qml/MainQML.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guis/qml/qml/MainQML.qml b/guis/qml/qml/MainQML.qml index 1f967846c..6953a5d82 100644 --- a/guis/qml/qml/MainQML.qml +++ b/guis/qml/qml/MainQML.qml @@ -26,6 +26,13 @@ import QtMultimedia 5.8 var msg = "[Axolotl Web View] [JS] (%1:%2) %3".arg(sourceID).arg(lineNumber).arg(message) console.log(msg) } + onLoadingChanged:{ + // interceptor to make the registration captcha work + var msg = "[Axolotl Web View] [JS] url changed %1".arg(url) + console.log(msg) + var interceptor = "window.onToken = function(token){window.location = 'http://localhost:9080/?token='+token;};" + webView.runJavaScript(interceptor) + } WebEngineProfile{ id:webProfile }