#3 Fixed even more issues with the detection of subs and dubs

This commit is contained in:
Serraniel 2020-08-06 21:21:55 +02:00
parent 8fb9fdfcca
commit dcb5ce2f38
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -32,7 +32,7 @@ function updateLanguageDisplay(node) {
subCols.forEach(element => { subCols.forEach(element => {
let langAttr = element.attributes['ng-hide'].value; let langAttr = element.attributes['ng-hide'].value;
let lang = langAttr.substring(langAttr.indexOf(langPrefix) + langPrefix.length, langAttr.indexOf(subSuffix)); let lang = langAttr.substring(langAttr.indexOf(langPrefix) + langPrefix.length, langAttr.indexOf(subSuffix));
if (element.ariaHidden) { if (element.attributes['aria-hidden'].value == 'false') {
subs.push(lang); subs.push(lang);
} }
}); });
@ -42,11 +42,15 @@ function updateLanguageDisplay(node) {
dubCols.forEach(element => { dubCols.forEach(element => {
let langAttr = element.attributes['ng-hide'].value; let langAttr = element.attributes['ng-hide'].value;
let lang = langAttr.substring(langAttr.indexOf(langPrefix) + langPrefix.length, langAttr.indexOf(dubSuffix)); let lang = langAttr.substring(langAttr.indexOf(langPrefix) + langPrefix.length, langAttr.indexOf(dubSuffix));
if (element.ariaHidden) { if (element.attributes['aria-hidden'].value == 'false') {
dubs.push(lang); dubs.push(lang);
} }
}); });
console.log(subs)
console.log(dubs)
// build output html // build output html
let iconsRequired = true; let iconsRequired = true;
let cols = []; let cols = [];