Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Use ad-block and TP from muon
Browse files Browse the repository at this point in the history
Related to: #11352
  • Loading branch information
bbondy committed Oct 20, 2017
1 parent 153f110 commit 28fc0cb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 38 deletions.
6 changes: 3 additions & 3 deletions app/adBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict'

const urlParse = require('./common/urlParse')
const {adBlockDataFileVersion, AdBlockClient} = require('ad-block')
const {adBlockDataFileVersion, adBlockLists, AdBlockClient} = require('ad-block')
const dataFile = require('./dataFile')
const Filtering = require('./filtering')
const appConfig = require('../js/constants/appConfig')
Expand All @@ -14,7 +14,6 @@ const debounce = require('../js/lib/debounce')
const adblockInstances = new Map()
const defaultAdblock = new AdBlockClient()
const defaultSafeBrowsing = new AdBlockClient()
const regions = require('ad-block/lib/regions')
const getSetting = require('../js/settings').getSetting
const {ADBLOCK_CUSTOM_RULES} = require('../js/constants/settings')
const customFilterRulesUUID = 'CE61F035-9F0A-4999-9A5A-D4E46AF676F7'
Expand Down Expand Up @@ -67,7 +66,8 @@ module.exports.init = () => {
.initInstance(defaultAdblock, module.exports.adBlockResourceName, false)
.initInstance(defaultSafeBrowsing, module.exports.safeBrowsingResourceName, true)
// Initialize the regional adblock files that are enabled
regions
adBlockLists
.regions
.filter((region) => getSetting(`adblock.${region.uuid}.enabled`))
.forEach((region) => module.exports.updateAdblockDataFiles(region.uuid, true))
const customRules = getSetting(ADBLOCK_CUSTOM_RULES)
Expand Down
2 changes: 1 addition & 1 deletion app/browser/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const updateAboutDetails = (tab, tabValue) => {
tab.send(messages.ADBLOCK_UPDATED, {
adblock: adblock.toJS(),
settings: appSettings.toJS(),
resources: require('ad-block/lib/regions')
resources: require('ad-block').adBlockLists.regions
})
} else if (location === 'about:downloads' && downloads) {
tab.send(messages.DOWNLOADS_UPDATED, {
Expand Down
32 changes: 0 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"homepage": "https://www.brave.com/",
"dependencies": {
"acorn": "3.2.0",
"ad-block": "^3.0.5",
"aphrodite": "1.1.0",
"async": "^2.0.1",
"bat-balance": "^1.0.1",
Expand Down Expand Up @@ -122,7 +121,6 @@
"string.prototype.startswith": "^0.2.0",
"tablesort": "5.0.1",
"tldjs": "1.6.2",
"tracking-protection": "1.1.x",
"underscore": "1.8.3",
"url-loader": "~0.6.2",
"webtorrent-remote": "^2.0.2"
Expand Down

0 comments on commit 28fc0cb

Please sign in to comment.