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 378389863a - Show all commits

View file

@ -10,7 +10,6 @@ export function init() {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
}, "^/anime/[0-9]*$");
}
function updateLanguageDisplay(node) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
const langPrefix = 'ep.lang.';
const dubSuffix = 'dub';
const subSuffix = 'sub';
@ -19,13 +18,19 @@ function updateLanguageDisplay(node) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
const subIcon = 'closed_caption';
const zeroWidthSpace = ''; // ​
let listItems = document.querySelectorAll('md-list-item');
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
function updateLanguageDisplay(node) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
const listNodeName = 'MD-LIST-ITEM';
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
listItems.forEach(item => {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
if (node.nodeName === listNodeName) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
updateLanguageDisplayListMode(node);
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
}
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
}
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
function updateLanguageDisplayListMode(node) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
// last column with flags
let col = item.querySelector('h3.layout-align-end-center');
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
let col = node.querySelector('h3.layout-align-end-center');
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
if (col.eaManipulated) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
if (typeof col === 'undefined' || col.eaManipulated) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
return;
}
@ -181,15 +186,14 @@ function updateLanguageDisplay(node) {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
col.appendChild(div);
});
item.querySelectorAll('.layout-column:not(:last-child)').forEach(div => {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
node.querySelectorAll('.layout-column:not(:last-child)').forEach(div => {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
div.style.borderRight = '1px solid rgba(155,155,155, 0.2)';
})
item.querySelectorAll('.layout-column').forEach(div => {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
node.querySelectorAll('.layout-column').forEach(div => {
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
div.style.paddingLeft = '2px';
div.style.paddingRight = '2px';
})
col.eaManipulated = true;
});
kaffem commented 2020-10-01 19:36:31 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, false);
```suggestion doUpdateLanguageDisplay(col, false); ```
kaffem commented 2020-10-01 19:37:25 +02:00 (Migrated from github.com)
Review
    doUpdateLanguageDisplay(col, true);
```suggestion doUpdateLanguageDisplay(col, true); ```
kaffem commented 2020-10-01 19:37:29 +02:00 (Migrated from github.com)
Review
function doUpdateLanguageDisplay(parent, isBoxedModed) {
```suggestion function doUpdateLanguageDisplay(parent, isBoxedModed) { ```
}