diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-01-24 16:09:07 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-01-24 16:09:07 +0100 |
commit | 0250559bcf5764fb8cf3a8ccc4e330b8ed855f96 (patch) | |
tree | 2283350e44f78e83a8c0257b66c184939cd95a98 /src/webengine/urlinterceptor.cpp | |
parent | Made Profile menu a regular menu (diff) | |
download | smolbote-0250559bcf5764fb8cf3a8ccc4e330b8ed855f96.tar.xz |
Blocker UI
Diffstat (limited to 'src/webengine/urlinterceptor.cpp')
-rw-r--r-- | src/webengine/urlinterceptor.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp new file mode 100644 index 0000000..87879a5 --- /dev/null +++ b/src/webengine/urlinterceptor.cpp @@ -0,0 +1,19 @@ +#include "urlinterceptor.h" + +AdBlockInterceptor::AdBlockInterceptor(QObject *parent) : + QWebEngineUrlRequestInterceptor(parent) +{ +} + +void AdBlockInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) +{ +// bool blocked = false; +// for(AdBlockRule *rule : m_urlBlacklist) { +// if(rule->match(info.requestUrl())) { +// info.block(true); +// blocked = true; +// } +// } + + qDebug("%i %i %s %s", info.navigationType(), info.resourceType(), qUtf8Printable(info.requestMethod()), qUtf8Printable(info.requestUrl().toString())); +} |