6
6
* replace battlefield image with solid color
7
7
*/
8
8
const b = document . body ;
9
- b . style . background = '#131b42' ;
10
- b . style . backgroundImage = 'none' ;
11
-
9
+ b . style . background = "#131b42" ;
10
+ b . style . backgroundImage = "none" ;
12
11
13
12
/**
14
13
* remove promotional content for social media
15
14
*/
16
- [ '.fbLikeBoxHolder' , '.subscribe' ] . forEach ( css => {
17
- const like = document . querySelector ( css ) ;
18
- if ( like ) like . parentNode . remove ( ) ;
19
- } ) ;
15
+ [ ".fbLikeBoxHolder" , ".subscribe" ] . forEach (
16
+ ( css ) => {
17
+ const like = document . querySelector ( css ) ;
18
+ if ( like ) {
19
+ like . parentNode . remove ( ) ;
20
+ }
21
+ } ,
22
+ ) ;
20
23
21
24
/**
22
25
* remove superflous footer text
23
26
*/
24
- const copy = document . querySelector ( '.screen.footer #copyright:nth-of-type(3)' ) ;
25
- if ( copy ) copy . remove ( ) ;
27
+ const copy = document . querySelector ( ".screen.footer #copyright:nth-of-type(3)" ) ;
28
+ if ( copy ) {
29
+ copy . remove ( ) ;
30
+ }
26
31
27
32
/**
28
33
* automatically move to next verse
29
34
* after audio ends
30
35
*/
31
36
const verse = document . querySelector ( "#verseAudio audio" ) ;
32
37
if ( verse ) {
33
- verse . onended = ( ) => {
34
- const A = document . querySelector ( ".verseNav .nextArrow a" ) ;
35
- // chapter end
36
- if ( A . href === 'javascript:;' ) {
37
- const B = document . querySelector ( ".chapterNav .nextArrow a" ) ;
38
- B . click ( ) ;
39
- } else {
40
- A . click ( ) ;
41
- }
42
- }
38
+ verse . onended =
39
+ ( ) => {
40
+ const A = document . querySelector ( ".verseNav .nextArrow a" ) ;
41
+ // chapter end
42
+ if ( A . href === "javascript:;" ) {
43
+ const B = document . querySelector ( ".chapterNav .nextArrow a" ) ;
44
+ B . click ( ) ;
45
+ } else {
46
+ A . click ( ) ;
47
+ }
48
+ } ;
49
+ try {
50
+ verse . play ( ) ;
51
+ } catch ( _ ) { }
43
52
}
44
53
45
-
46
-
47
- if ( [ '/index' , '/dedication' , '/introduction' , '/publishers-note' ] . includes ( location . pathname . toLowerCase ( ) ) ) {
48
- document . querySelector ( 'aside' ) . remove ( ) ;
49
- }
54
+ if (
55
+ [ "/index" , "/dedication" , "/introduction" , "/publishers-note" ] . includes (
56
+ location . pathname . toLowerCase ( ) ,
57
+ )
58
+ ) {
59
+ document . querySelector ( "aside" ) . remove ( ) ;
60
+ }
0 commit comments