summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-03-31 01:33:48 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-03-31 01:33:48 +0200
commit66e7ed81f0612a11bcc424658ceec733447975a5 (patch)
treef3923532e41a03872037bbb7f468da41faffea59
parentNot so stupid, after all.. (diff)
downloadrekonq-66e7ed81f0612a11bcc424658ceec733447975a5.tar.xz
This is just a stupid idea, but it seems working well.. :)
The idea basically is: hide and set dimensione to ZERO to adblocked elements. This seems cleaning page WARNING: NEED TESTS!!!
-rw-r--r--src/adblock/adblockmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index e4986264..feb92864 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -188,7 +188,8 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request, WebPage *pa
{
kDebug() << "MATCHES ATTRIBUTE!!!!!";
el.setStyleProperty(QLatin1String("visibility"), QLatin1String("hidden"));
- el.removeFromDocument();
+ el.setStyleProperty(QLatin1String("width"), QLatin1String("0"));
+ el.setStyleProperty(QLatin1String("height"), QLatin1String("0"));
}
}