1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

AdBlock: Don't show element hiding rules when viewing source code

This commit is contained in:
nowrep 2012-06-28 12:03:08 +02:00
parent c6ccd6bd1f
commit 7e6ba1d702

View File

@ -138,7 +138,10 @@ void SourceViewer::loadSource()
m_actionCopy->setEnabled(false);
m_actionPaste->setEnabled(false);
m_sourceEdit->setPlainText(m_frame.data()->toHtml());
QString html = m_frame.data()->toHtml();
// Remove AdBlock element hiding rules
html.remove(QRegExp("<style type=\"text/css\">\n/\\* AdBlock for QupZilla \\*/\n.*\\{display: none !important;\\}\n</style>"));
m_sourceEdit->setPlainText(html);
//Highlight selectedHtml
if (!m_selectedHtml.isEmpty()) {