diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-03 22:41:13 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-03 22:41:13 +0100 |
commit | 84e6bc417bdf14c0e6f792d80898e45643a02d44 (patch) | |
tree | 68c3f6c8514b8a0c6e644ca842c89610bc738d64 /src/webengine/urlinterceptor.cpp | |
parent | option parsing (diff) | |
download | smolbote-84e6bc417bdf14c0e6f792d80898e45643a02d44.tar.xz |
More blocklist options
Diffstat (limited to 'src/webengine/urlinterceptor.cpp')
-rw-r--r-- | src/webengine/urlinterceptor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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())); } |