diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-11-23 03:11:26 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-11-23 03:11:26 +0100 |
commit | df7a2820a54d8b69e87b495269b88f9ae5ac156d (patch) | |
tree | 4124db211bddf2dbf784d0eddbf70bbb8c24ee0f /src/webpage.cpp | |
parent | Fixing urlbar size (diff) | |
parent | Saving 4 bytes per tab :) (diff) | |
download | rekonq-df7a2820a54d8b69e87b495269b88f9ae5ac156d.tar.xz |
Merge branch 'devAdBlock'
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); } |