diff --git a/src/plugins/GreaseMonkey/gm_urlinterceptor.cpp b/src/plugins/GreaseMonkey/gm_urlinterceptor.cpp index 81858a8a1..833e9c358 100644 --- a/src/plugins/GreaseMonkey/gm_urlinterceptor.cpp +++ b/src/plugins/GreaseMonkey/gm_urlinterceptor.cpp @@ -26,7 +26,10 @@ GM_UrlInterceptor::GM_UrlInterceptor(GM_Manager *manager) void GM_UrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { - if (info.navigationType() != QWebEngineUrlRequestInfo::NavigationTypeLink) + bool xhr = info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeXhr; + bool clickedLink = info.navigationType() == QWebEngineUrlRequestInfo::NavigationTypeLink; + + if (xhr || !clickedLink) return; if (info.requestUrl().toString().endsWith(QLatin1String(".user.js"))) { @@ -34,3 +37,4 @@ void GM_UrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) info.block(true); } } +