Added duplicate alert for collection, closes #74

This commit is contained in:
Peng-YM 2022-03-11 21:08:43 +08:00
parent 2b419ee8e4
commit a981763982
2 changed files with 11 additions and 2 deletions

View File

@ -981,6 +981,15 @@ function service() {
if (proxies.length === 0) {
throw new Error(`组合订阅中不含有效节点!`);
}
// check duplicate
const count = {};
proxies.forEach(p => {
if (count[p.name]) {
$.notify("🌍 『 𝑺𝒖𝒃-𝑺𝒕𝒐𝒓𝒆 』", "⚠️ 订阅包含重复节点!", "请仔细检测配置!", {
"media-url": "https://cdn3.iconfinder.com/data/icons/seo-outline-1/512/25_code_program_programming_develop_bug_search_developer-512.png"
});
}
});
return ProxyUtils.produce(proxies, platform);
} else if (type === "rule") {
const rule = item;

File diff suppressed because one or more lines are too long