mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 18:39:58 +00:00
Prevent duplicate whitelist entries with menu UI
This commit is contained in:
@@ -139,10 +139,11 @@ async function initMenus () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const whitelist = await options.get("userAgentWhitelist");
|
const whitelist = await options.get("userAgentWhitelist");
|
||||||
|
if (!whitelist.includes(pattern)) {
|
||||||
// Add to whitelist and update options
|
// Add to whitelist and update options
|
||||||
whitelist.push(pattern);
|
whitelist.push(pattern);
|
||||||
await options.set("userAgentWhitelist", whitelist);
|
await options.set("userAgentWhitelist", whitelist);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user