Skip to content

Commit

Permalink
Add string exemptions to other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston committed Mar 31, 2023
1 parent c0e7cde commit 88e5104
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,21 @@ export function processConfig (data, userList, preferences, platformSpecificFeat
output.featureSettings[featureName] = data.features[featureName].settings
})

output.stringExemptionLists = getBrokenScriptLists(data)

return output
}

// We inject this into content scripts
export function getBrokenScriptLists (data) {
const brokenScripts = {}
for (const key in data.features) {
const featureSettings = data.features[key]
brokenScripts[key] = featureSettings.scripts?.map(obj => obj.domain) || []
}
return brokenScripts
}

export function isGloballyDisabled (args) {
return args.site.allowlisted || args.site.isBroken
}
Expand Down

0 comments on commit 88e5104

Please sign in to comment.