Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii committed Jun 2, 2024
1 parent 886d92c commit 0bd7f61
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/legend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ export const Legend = function (language: ReturnType<typeof Language>) {
let totalOnlineNodes = data.nodes.online.length;

let config = window.config;
var filterNodes = [];
var filtertNodes = [];
if (config.domainNames) {
let domains = config.domainNames.filter(function (domain) {
let filtertdomains = config.domainNames.filter(function (domain) {
if(typeof domain.filterClients !== 'undefined'){
return domain.filterClients;
}else{
return false
}
});
domains.forEach((domain) => {
filterNodes.push(domain.name)
filterNodes.push(domain.domain)
filtertdomains.forEach((domain) => {
filtertNodes.push(domain.name)
filtertNodes.push(domain.domain)
})
}

let totalNodesFiltert = data.nodes.online.filter(function (node) {
var isFiltert = true
// filter nodes based on the domain
if(filterNodes.includes(node.domain)){
if(filtertNodes.includes(node.domain)){
isFiltert = false
}
// also filter nodes based on the firmware base (Domainname) for custom respondd
if(filterNodes.includes(node.firmware.base))[
if(filtertNodes.includes(node.firmware.base))[
isFiltert = false
]
return isFiltert
Expand Down

0 comments on commit 0bd7f61

Please sign in to comment.