-
Notifications
You must be signed in to change notification settings - Fork 0
/
mliturgiecz.js
44 lines (38 loc) · 1.18 KB
/
mliturgiecz.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
const lang = 'cs';
const elementGroups = [
{
desc: 'introit',
xpath: "//h4[contains(text(), 'Vstupní antifona')]/following-sibling::p[1]",
highlight: 'orange'
},
{
desc: 'responsorial psalm',
// string(element) returns text content of the element and all its children
xpath: "//h4[contains(string(.), 'Mezizpěv')]/following-sibling::p[1]",
highlight: 'red'
},
/*
{
desc: 'alleluia / verse before the Gospel',
xpath: "//h4[contains(string(.), 'Zpěv před evangeliem')]/following-sibling::p[1]",
highlight: 'blue'
},
*/
{
desc: 'communio',
xpath: "//h4[contains(text(), 'Antifona k přijímání')]/following-sibling::p[1]",
highlight: 'yellow'
}
];
class MLiturgieCzEAntiphonal extends EAntiphonal {
decorateChantText(node, group) {
if (this.debug) {
node.style.border = '2px solid ' + group.highlight;
}
}
decorateChantTextNotationMissing(node) {
node.setAttribute('class', node.getAttribute('class') + ' eantifonar-music-not-found');
}
}
new MLiturgieCzEAntiphonal(lang, elementGroups).run();