Skip to content
This repository has been archived by the owner. It is now read-only.

Add an option to cancel a request #197

Merged
merged 5 commits into from Mar 19, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add non explicitcancel rules so they are backwards compatible instead…

… of ignored
  • Loading branch information
bbondy committed Mar 19, 2019
commit b5e3d900a2c442e1f724a30459aae5a321d259b9
@@ -19,10 +19,10 @@ const filterPredicateWithPossibleLogging = (rule, filterPredicate = I) => {
* Mapping rule which reformats rules
*/
const mapRule = (rule) => {
if (rule == '||imasdk.googleapis.com^$third-party') {
if (rule === '||imasdk.googleapis.com^$third-party') {
return '||imasdk.googleapis.com^$third-party,explicitcancel'
}
if (rule == '/ima3.js') {
if (rule === '/ima3.js') {
return '/ima3.js$explicitcancel'
}
return rule
@@ -39,6 +39,12 @@ const sanitizeABPInput = (input, filterPredicate = I) =>
.filter((rule) =>
filterPredicateWithPossibleLogging(rule, filterPredicate))
.map(mapRule)
// TODO: This can be removed a few versions after 0.62.x.
// It was just added to be backwards compatible with 0.61.x.
.concat([
'||imasdk.googleapis.com/$third-party',
'^ima3.js'
])
.join('\n')

module.exports = {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.