MCPcopy
hub / github.com/philc/vimium / setRules

Function setRules

background_scripts/exclusions.js:66–70  ·  view source on GitHub ↗
(rules)

Source from the content-addressed store, hash-verified

64}
65
66function setRules(rules) {
67 // Callers map a rule to null to have it deleted, and rules without a pattern are useless.
68 const newRules = rules.filter((rule) => rule?.pattern);
69 Settings.set("exclusionRules", newRules);
70}
71
72function onSettingsUpdated() {
73 // NOTE(mrmr1993): In FF, the |rules| argument will be garbage collected when the exclusions

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected