1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

AdBlock: Add NoCoin List as default list with EasyList

This commit is contained in:
David Rosca 2018-02-14 08:53:14 +01:00
parent adf24d7f94
commit 709568ff36
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 9 additions and 3 deletions

View File

@ -26,6 +26,7 @@ AdBlockAddSubscriptionDialog::AdBlockAddSubscriptionDialog(QWidget* parent)
ui->setupUi(this);
m_knownSubscriptions << Subscription("EasyList (English)", ADBLOCK_EASYLIST_URL)
<< Subscription("NoCoin List", ADBLOCK_NOCOINLIST_URL)
<< Subscription("BSI Lista Polska (Polish)", "http://www.bsi.info.pl/filtrABP.txt")
<< Subscription("Czech List (Czech)", "http://adblock.dajbych.net/adblock.txt")
<< Subscription("dutchblock (Dutch)", "http://groenewoudt.net/dutchblock/list.txt")

View File

@ -311,13 +311,17 @@ void AdBlockManager::load()
m_subscriptions.append(subscription);
}
// Prepend EasyList if subscriptions are empty
// Add EasyList + NoCoinList if subscriptions are empty
if (m_subscriptions.isEmpty()) {
AdBlockSubscription* easyList = new AdBlockSubscription(tr("EasyList"), this);
AdBlockSubscription *easyList = new AdBlockSubscription(tr("EasyList"), this);
easyList->setUrl(QUrl(ADBLOCK_EASYLIST_URL));
easyList->setFilePath(DataPaths::currentProfilePath() + QLatin1String("/adblock/easylist.txt"));
m_subscriptions.append(easyList);
m_subscriptions.prepend(easyList);
AdBlockSubscription *noCoinList = new AdBlockSubscription(tr("NoCoin List"), this);
noCoinList->setUrl(QUrl(ADBLOCK_NOCOINLIST_URL));
noCoinList->setFilePath(DataPaths::currentProfilePath() + QLatin1String("/adblock/nocoinlist.txt"));
m_subscriptions.append(noCoinList);
}
// Append CustomList

View File

@ -28,6 +28,7 @@
#include "qzcommon.h"
#define ADBLOCK_EASYLIST_URL "https://easylist-downloads.adblockplus.org/easylist.txt"
#define ADBLOCK_NOCOINLIST_URL "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/nocoin.txt"
class AdBlockRule;
class AdBlockDialog;