Feature/#3 better display of language icons #55
|
@ -10,22 +10,27 @@ export function init() {
|
||||||
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) {
```
|
|||||||
}, "^/anime/[0-9]*$");
|
}, "^/anime/[0-9]*$");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const langPrefix = 'ep.lang.';
|
||||||
```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) {
```
|
|||||||
function updateLanguageDisplay(node) {
|
function updateLanguageDisplay(node) {
|
||||||
const langPrefix = 'ep.lang.';
|
const listNodeName = 'MD-LIST-ITEM';
|
||||||
```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) {
```
|
|||||||
|
|
||||||
const dubIcon = 'volume_up';
|
if (node.nodeName === listNodeName) {
|
||||||
```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 subIcon = 'closed_caption';
|
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) {
```
|
|||||||
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) {
```
|
|||||||
|
}
|
||||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
|||||||
|
|
||||||
let listItems = document.querySelectorAll('md-list-item');
|
function 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) {
```
|
|||||||
|
|
||||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
|||||||
listItems.forEach(item => {
|
|
||||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
|||||||
// last column with flags
|
// last column with flags
|
||||||
let col = item.querySelector('h3.layout-align-end-center');
|
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 (col.eaManipulated) {
|
if (typeof col === 'undefined' || col.eaManipulated) {
|
||||||
```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) {
```
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,15 +186,14 @@ function 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) {
```
|
|||||||
col.appendChild(div);
|
col.appendChild(div);
|
||||||
});
|
});
|
||||||
|
|
||||||
item.querySelectorAll('.layout-column:not(:last-child)').forEach(div => {
|
node.querySelectorAll('.layout-column:not(:last-child)').forEach(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) {
```
|
|||||||
div.style.borderRight = '1px solid rgba(155,155,155, 0.2)';
|
div.style.borderRight = '1px solid rgba(155,155,155, 0.2)';
|
||||||
})
|
})
|
||||||
|
|
||||||
item.querySelectorAll('.layout-column').forEach(div => {
|
node.querySelectorAll('.layout-column').forEach(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) {
```
|
|||||||
div.style.paddingLeft = '2px';
|
div.style.paddingLeft = '2px';
|
||||||
div.style.paddingRight = '2px';
|
div.style.paddingRight = '2px';
|
||||||
})
|
})
|
||||||
|
|
||||||
col.eaManipulated = true;
|
col.eaManipulated = true;
|
||||||
});
|
|
||||||
```suggestion
doUpdateLanguageDisplay(col, false);
```
```suggestion
doUpdateLanguageDisplay(col, true);
```
```suggestion
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```
|
|||||||
}
|
}
|
Loading…
Reference in a new issue