1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

AdBlockManager: Disable blocking on view-source scheme

This commit is contained in:
David Rosca 2018-01-06 11:28:29 +01:00
parent 0ff1ebc584
commit 394221c5c0

View File

@ -1,6 +1,6 @@
/* ============================================================ /* ============================================================
* Falkon - Qt web browser * Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com> * Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -387,9 +387,8 @@ bool AdBlockManager::isEnabled() const
bool AdBlockManager::canRunOnScheme(const QString &scheme) const bool AdBlockManager::canRunOnScheme(const QString &scheme) const
{ {
return !(scheme == QLatin1String("file") || scheme == QLatin1String("qrc") return !(scheme == QL1S("file") || scheme == QL1S("qrc") || scheme == QL1S("view-source")
|| scheme == QLatin1String("falkon") || scheme == QLatin1String("data") || scheme == QL1S("falkon") || scheme == QL1S("data") || scheme == QL1S("abp"));
|| scheme == QLatin1String("abp"));
} }
bool AdBlockManager::canBeBlocked(const QUrl &url) const bool AdBlockManager::canBeBlocked(const QUrl &url) const