Feature/#3 better display of language icons #55
224
src/javascript/enhancements/languageDisplay.js
Normal file
224
src/javascript/enhancements/languageDisplay.js
Normal file
|
@ -0,0 +1,224 @@
|
|||
kaffem
commented
Review
```suggestion
doUpdateLanguageDisplay(col, false);
```
kaffem
commented
Review
```suggestion
doUpdateLanguageDisplay(col, true);
```
kaffem
commented
Review
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
import * as core from '../utils/aniwatchCore';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
import * as helper from '../utils/helpers';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
export function init() {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
core.registerScript(node => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// run the scripts
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (helper.isHtmlElement(node)) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
updateLanguageDisplay(node)
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}, "^/anime/[0-9]*$");
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
function updateLanguageDisplay(node) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const listNodeName = 'MD-LIST-ITEM';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const boxNodeName = 'DIV';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const boxClassName = 'card-margin';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (node.nodeName === listNodeName) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
updateLanguageDisplayListMode(node);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
else if (node.nodeName === boxNodeName && node.classList.contains(boxClassName)) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
updateLanguageDisplayBoxMode(node);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
function updateLanguageDisplayListMode(node) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// last column with flags
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let col = node.querySelector('h3.layout-align-end-center');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (typeof col === 'undefined' || col.awpManipulated) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
return;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
doUpdateLanguageDisplay(col, false);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
function updateLanguageDisplayBoxMode(node) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// last column with flags
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let col = node.querySelector('div.layout-align-end-start');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (typeof col === 'undefined' || col.awpManipulated) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
return;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
doUpdateLanguageDisplay(col, true);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
function doUpdateLanguageDisplay(parent, isBoxedModed) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const listLangPrefix = 'ep.lang.';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const boxLangPrefix = 'episodeObject.lang.';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// aniwatch uses different prefixes in list und box mode :/
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let realLangPrefix = isBoxedModed ? boxLangPrefix : listLangPrefix;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const dubSuffix = 'dub';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const subSuffix = 'sub';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const dubIcon = 'volume_up';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const subIcon = 'closed_caption';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
const zeroWidthSpace = ''; // ​
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let subs = [];
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let dubs = [];
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// find subs
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let subCols = parent.querySelectorAll('[ng-hide*="sub"]');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subCols.forEach(element => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let langAttr = element.attributes['ng-hide'].value;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let lang = langAttr.substring(langAttr.indexOf(realLangPrefix) + realLangPrefix.length, langAttr.indexOf(subSuffix));
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (element.attributes['aria-hidden'].value == 'false') {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subs.push(lang);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
});
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// find dubs
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let dubCols = parent.querySelectorAll('[ng-hide*="dub"]');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubCols.forEach(element => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let langAttr = element.attributes['ng-hide'].value;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let lang = langAttr.substring(langAttr.indexOf(realLangPrefix) + realLangPrefix.length, langAttr.indexOf(dubSuffix));
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (element.attributes['aria-hidden'].value == 'false') {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubs.push(lang);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
});
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// build output html
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let iconsRequired = true;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let cols = [];
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// subs first;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (subs.length > 0) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let colDiv = document.createElement('div');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.setAttribute('layout', 'column');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.classList.add('layout-column');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// do we have dubs?
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (dubs.length > 0) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let dubDiv = document.createElement('div');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.setAttribute('layout', 'row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.setAttribute('layout-align', 'start center');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.classList.add('layout-align-start-center', 'layout-row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let dubIconDiv = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (iconsRequired) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.classList.add('material-icons', 'mr-3');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.innerText = dubIcon;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// add dummy with 24px for correct presentation
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
else {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.style.height = '24px';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.innerText = zeroWidthSpace;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.appendChild(dubIconDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let japIcon = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
japIcon.classList.add('flag', 'flag-jp', 'mg-all-1');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.appendChild(japIcon);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.appendChild(dubDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// do the subs
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let subDiv = document.createElement('div');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.setAttribute('layout', 'row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.setAttribute('layout-align', 'start center');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.classList.add('layout-align-start-center', 'layout-row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let subIconDiv = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (iconsRequired) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.classList.add('material-icons', 'mr-3');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.innerText = subIcon;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// add dummy with 24px for correct presentation
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
else {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.style.height = '24px';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.innerText = zeroWidthSpace;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.appendChild(subIconDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subs.forEach(lang => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let langIcon = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
langIcon.classList.add('flag', `flag-${lang}`, 'mg-all-1');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.appendChild(langIcon);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
});
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.appendChild(subDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
cols.push(colDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
iconsRequired = false;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (dubs.length > 0) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubs.forEach(lang => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let colDiv = document.createElement('div');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.setAttribute('layout', 'column');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.classList.add('layout-column');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let dubDiv = document.createElement('div');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.setAttribute('layout', 'row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.setAttribute('layout-align', 'start center');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.classList.add('layout-align-start-center', 'layout-row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let dubIconDiv = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (iconsRequired) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.classList.add('material-icons', 'mr-3');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.innerText = dubIcon;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// add dummy with 24px for correct presentation
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
else {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.style.height = '24px';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubIconDiv.innerText = zeroWidthSpace;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.appendChild(dubIconDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let langIcon = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
langIcon.classList.add('flag', `flag-${lang}`, 'mg-all-1');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
dubDiv.appendChild(langIcon);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.appendChild(dubDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// do we have subs?
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (subs.length > 0) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let subDiv = document.createElement('div');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.setAttribute('layout', 'row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.setAttribute('layout-align', 'start center');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.classList.add('layout-align-start-center', 'layout-row');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
let subIconDiv = document.createElement('i');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
if (iconsRequired) {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.classList.add('material-icons', 'mr-3');
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.innerText = subIcon;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
// add dummy with 24px for correct presentation
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
else {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.style.height = '24px';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subIconDiv.innerText = zeroWidthSpace;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
subDiv.appendChild(subIconDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
colDiv.appendChild(subDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
cols.push(colDiv);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
iconsRequired = false;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
});
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
parent.innerHTML = '';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
cols.forEach(div => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
parent.appendChild(div);
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
});
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
parent.querySelectorAll('.layout-column:not(:last-child)').forEach(div => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
div.style.borderRight = '1px solid rgba(155,155,155, 0.2)';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
})
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
parent.querySelectorAll('.layout-column').forEach(div => {
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
div.style.paddingLeft = '2px';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
div.style.paddingRight = '2px';
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
})
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
parent.awpManipulated = true;
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
||||
}
|
||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
|
@ -4,6 +4,7 @@ import { initCore } from './utils/aniwatchCore';
|
|||
import { initHelpers } from './utils/helpers';
|
||||
// enhancements
|
||||
import { init as animeRequests } from './enhancements/animeRequests';
|
||||
import { init as languageDisplay } from './enhancements/languageDisplay';
|
||||
import { init as lists } from './enhancements/lists';
|
||||
import { init as quickSearch } from './enhancements/quickSearch';
|
||||
|
||||
|
@ -15,5 +16,6 @@ initHelpers();
|
|||
|
||||
// enhancements
|
||||
animeRequests();
|
||||
languageDisplay();
|
||||
lists();
|
||||
quickSearch();
|
Loading…
Reference in a new issue