diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-02-13 22:13:05 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-03-13 10:24:41 +0100 |
commit | ac7c15f3ed41a51b830a79ab5c78e0580e42e798 (patch) | |
tree | fb25ede8736fda823765edd99f14a427dbff97a7 /src/adblock | |
parent | Update adblock dialog (diff) | |
download | rekonq-ac7c15f3ed41a51b830a79ab5c78e0580e42e798.tar.xz |
Add adblock icon to inform users that some contents was hidden
This is a patch by Andrea Di Menna, changed a bit to allow element
blocked/hided listing (you'll see it in next commit)
REVIEW:102761
REVIEWED-BY: adjam
Diffstat (limited to 'src/adblock')
-rw-r--r-- | src/adblock/adblockmanager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index 0c0a66db..b435d437 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -226,6 +226,8 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request, WebPage *pa { kDebug() << "ADBLOCK: BLACK RULE Matched by string: " << urlString; AdBlockNetworkReply *reply = new AdBlockNetworkReply(request, urlString, this); + // TODO: add it to blocked list + page->setHasAdBlockedElements(true); return reply; } @@ -253,6 +255,8 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request, WebPage *pa } AdBlockNetworkReply *reply = new AdBlockNetworkReply(request, urlString, this); + // TODO: add it to blocked list + page->setHasAdBlockedElements(true); return reply; } } @@ -287,6 +291,8 @@ void AdBlockManager::applyHidingRules(WebPage *page) kDebug() << "Hide element: " << el.localName(); el.setStyleProperty(QL1S("visibility"), QL1S("hidden")); el.removeFromDocument(); + // TODO: add it to hided list + page->setHasAdBlockedElements(true); } } } |