to E: or not to E:

This commit is contained in:
j 2021-10-29 15:04:34 +01:00
commit 8997e05128
2 changed files with 22 additions and 3 deletions

View file

@ -339,7 +339,18 @@ function loadAnnotations(config) {
return !(config.user && annotation.user != config.user)
})
loadClips(annotations).then(annotations => {
config.annotations = annotations
config.annotations = annotations.filter(annotation => {
if (config.only_e) {
if (annotation.value.slice(0, 2) == 'E:') {
annotation.value = annotation.value.slice(2).trim()
return true
} else {
return false
}
} else {
return annotation.value.slice(0, 2) != 'E:'
}
})
renderAnnotations(config)
})
})
@ -358,7 +369,9 @@ function loadAnnotations(config) {
annotations.push(annotation)
}
} else {
annotations.push(annotation)
if (annotation.value.slice(0, 2) != 'E:') {
annotations.push(annotation)
}
}
})
})