summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-11-23 03:11:26 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-11-23 03:11:26 +0100
commitdf7a2820a54d8b69e87b495269b88f9ae5ac156d (patch)
tree4124db211bddf2dbf784d0eddbf70bbb8c24ee0f /src/webpage.cpp
parentFixing urlbar size (diff)
parentSaving 4 bytes per tab :) (diff)
downloadrekonq-df7a2820a54d8b69e87b495269b88f9ae5ac156d.tar.xz
Merge branch 'devAdBlock'
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp9
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);
}