Feature/#3 better display of language icons #55

Merged
Serraniel merged 18 commits from feature/#3-better-display-of-language-icons into develop 2020-10-01 21:34:19 +02:00
Showing only changes of commit 8fb9fdfcca - Show all commits

View file

@ -32,7 +32,9 @@ 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));
subs[lang] = element.ariaHidden; if (element.ariaHidden) {
subs.push(lang);
}
}); });
// find dubs // find dubs
@ -41,7 +43,7 @@ function updateLanguageDisplay(node) {
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.ariaHidden) {
subs.push(lang); dubs.push(lang);
} }
}); });
@ -76,7 +78,7 @@ function updateLanguageDisplay(node) {
dubDiv.appendChild(dubIconDiv); dubDiv.appendChild(dubIconDiv);
let japIcon = document.createElement('i'); let japIcon = document.createElement('i');
japIcon.classList.add('flag flag-jp'); japIcon.classList.add('flag', 'flag-jp');
dubDiv.appendChild(japIcon); dubDiv.appendChild(japIcon);
colDiv.appendChild(dubDiv); colDiv.appendChild(dubDiv);