mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2025-10-29 21:02:10 +01:00
using spaces instead of tabs now & added prettier config
This commit is contained in:
50
js/parser.js
50
js/parser.js
@@ -1,32 +1,32 @@
|
||||
function parseChannelInfos(channelInfos) {
|
||||
let result = [];
|
||||
let rootChannels = channelInfos.rootChannels;
|
||||
let subChannels = channelInfos.subChannels;
|
||||
let result = [];
|
||||
let rootChannels = channelInfos.rootChannels;
|
||||
let subChannels = channelInfos.subChannels;
|
||||
|
||||
rootChannels.forEach((rc) => {
|
||||
result.push(new Channel(rc.id, rc.properties.name));
|
||||
rootChannels.forEach((rc) => {
|
||||
result.push(new Channel(rc.id, rc.properties.name));
|
||||
|
||||
if (rc.id in subChannels) {
|
||||
subChannels[rc.id].forEach((sc) => {
|
||||
result.push(new Channel(sc.id, sc.properties.name));
|
||||
});
|
||||
}
|
||||
});
|
||||
return result;
|
||||
if (rc.id in subChannels) {
|
||||
subChannels[rc.id].forEach((sc) => {
|
||||
result.push(new Channel(sc.id, sc.properties.name));
|
||||
});
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
function parseClientInfos(clientInfos) {
|
||||
let result = [];
|
||||
clientInfos.forEach((e) => {
|
||||
result.push(
|
||||
new Client(
|
||||
e.id,
|
||||
channelList.getById(e.channelId),
|
||||
e.properties.nickname,
|
||||
e.properties.inputMuted,
|
||||
e.properties.outputMuted
|
||||
)
|
||||
);
|
||||
});
|
||||
return result;
|
||||
let result = [];
|
||||
clientInfos.forEach((e) => {
|
||||
result.push(
|
||||
new Client(
|
||||
e.id,
|
||||
channelList.getById(e.channelId),
|
||||
e.properties.nickname,
|
||||
e.properties.inputMuted,
|
||||
e.properties.outputMuted
|
||||
)
|
||||
);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user