File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ export const menuScrollableLinks =
6
6
7
7
export const sectionElements = document . getElementsByTagName ( 'section' ) ;
8
8
9
+ export const extensionSection = document . querySelector ( '.update-site' ) ;
10
+ export const ebookSection = document . querySelector ( '.jtw-ebook-banner' ) ;
11
+
9
12
export const extensionButton = document . getElementById ( 'extension-button' ) ;
10
13
export const extensionButtonText = extensionButton ?
11
14
extensionButton . querySelector ( '.button-text' ) :
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import {
14
14
publicKeyTextArea ,
15
15
codeElements ,
16
16
debuggerSection ,
17
+ extensionSection ,
18
+ ebookSection
17
19
} from './dom-elements.js' ;
18
20
19
21
/* For initialization, look at the end of this file */
@@ -57,9 +59,7 @@ function loadToken() {
57
59
}
58
60
59
61
function pickEbookOrExtensionBanner ( ) {
60
- var extensionSection = document . getElementsByClassName ( "update-site" ) [ 0 ] ;
61
- var ebookSection = document . getElementsByClassName ( "jtw-ebook-banner" ) [ 0 ] ;
62
- if ( Math . random ( ) >= .5 ) {
62
+ if ( Math . random ( ) >= 0.5 ) {
63
63
extensionSection . style . display = 'block' ;
64
64
} else {
65
65
ebookSection . style . display = 'block' ;
You can’t perform that action at this time.
0 commit comments