From 84e6bc417bdf14c0e6f792d80898e45643a02d44 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 3 Feb 2017 22:41:13 +0100 Subject: More blocklist options --- src/webengine/urlinterceptor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/webengine/urlinterceptor.cpp') diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp index fbcef64..9352af6 100644 --- a/src/webengine/urlinterceptor.cpp +++ b/src/webengine/urlinterceptor.cpp @@ -29,7 +29,7 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { for(BlockerRule *rule : m_sub->urlWhitelist()) { if(rule->match(info)) { - qDebug("OK %s", qUtf8Printable(info.requestUrl().toString())); + qDebug("OK %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString())); return; } } @@ -37,12 +37,13 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) for(BlockerRule *rule : m_sub->urlBlacklist()) { if(rule->match(info)) { info.block(true); - qDebug(" %s", qUtf8Printable(info.requestUrl().toString())); + qDebug(" %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString())); return; } } - qDebug("OK %s", qUtf8Printable(info.requestUrl().toString())); + // rule is neither in whitelist nor blacklist + qDebug("OK %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString())); } -- cgit v1.2.1