blob: 87879a58a36b904ab87064184c9df60fb325d1ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()));
}
|