mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
AdBlock: Add NoCoin List as default list with EasyList
This commit is contained in:
parent
adf24d7f94
commit
709568ff36
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user