mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 17:19:59 +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");
|
||||
|
||||
// Add to whitelist and update options
|
||||
whitelist.push(pattern);
|
||||
await options.set("userAgentWhitelist", whitelist);
|
||||
if (!whitelist.includes(pattern)) {
|
||||
// Add to whitelist and update options
|
||||
whitelist.push(pattern);
|
||||
await options.set("userAgentWhitelist", whitelist);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user