mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +01:00
AdBlock: Don't show element hiding rules when viewing source code
This commit is contained in:
parent
c6ccd6bd1f
commit
7e6ba1d702
|
@ -138,7 +138,10 @@ void SourceViewer::loadSource()
|
||||||
m_actionCopy->setEnabled(false);
|
m_actionCopy->setEnabled(false);
|
||||||
m_actionPaste->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
|
//Highlight selectedHtml
|
||||||
if (!m_selectedHtml.isEmpty()) {
|
if (!m_selectedHtml.isEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user