mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
AdBlock: Use display:block when hiding blocked iframes
visibility:hidden leaves empty space in page
This commit is contained in:
parent
a750858ed7
commit
5cf4d0d6e0
|
@ -828,12 +828,12 @@ bool WebPage::extension(Extension extension, const ExtensionOption* option, Exte
|
||||||
QWebElement docElement = erPage->mainFrame()->documentElement();
|
QWebElement docElement = erPage->mainFrame()->documentElement();
|
||||||
|
|
||||||
QWebElementCollection elements;
|
QWebElementCollection elements;
|
||||||
elements.append(docElement.findAll("iframe"));
|
elements.append(docElement.findAll(QSL("iframe")));
|
||||||
|
|
||||||
foreach (QWebElement element, elements) {
|
foreach (QWebElement element, elements) {
|
||||||
const QString src = element.attribute("src");
|
const QString src = element.attribute(QSL("src"));
|
||||||
if (!src.isEmpty() && exOption->url.toString().contains(src)) {
|
if (!src.isEmpty() && exOption->url.toString().contains(src)) {
|
||||||
element.setStyleProperty("visibility", "hidden");
|
element.setStyleProperty(QSL("display"), QSL("none"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user