diff options
Diffstat (limited to 'src/webengine/urlinterceptor.cpp')
-rw-r--r-- | src/webengine/urlinterceptor.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp index 9352af6..3c6a56e 100644 --- a/src/webengine/urlinterceptor.cpp +++ b/src/webengine/urlinterceptor.cpp @@ -27,27 +27,10 @@ UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent) : void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { - for(BlockerRule *rule : m_sub->urlWhitelist()) { - if(rule->match(info)) { - qDebug("OK %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString())); - return; - } - } - - for(BlockerRule *rule : m_sub->urlBlacklist()) { - if(rule->match(info)) { - info.block(true); - qDebug(" %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString())); - return; - } - } - - // rule is neither in whitelist nor blacklist - qDebug("OK %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString())); - + // } -void UrlRequestInterceptor::setSubscription(BlockerSubscription *subscription) +void UrlRequestInterceptor::setSubscription(BlockerManager *subscription) { - m_sub = subscription; + m_blocker = subscription; } |