diff options
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r-- | src/webpage.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index 94ecbe09..941567a0 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -41,6 +41,7 @@ #include "mainview.h" #include "webview.h" #include "webpluginfactory.h" +#include "adblockmanager.h" // KDE Includes #include <KStandardDirs> @@ -252,7 +253,9 @@ QString WebPage::errorPage(QNetworkReply *reply) bool WebPage::authorizedRequest(const QUrl &url) const { - Q_UNUSED(url) - // TODO implement ad-block here - return true; + // we filter just http sites + if(url.scheme() != QLatin1String("http")) + return true; + + return Application::adblockManager()->isUrlAllowed(url); } |