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 =
66
77export const sectionElements = document . getElementsByTagName ( 'section' ) ;
88
9+ export const extensionSection = document . querySelector ( '.update-site' ) ;
10+ export const ebookSection = document . querySelector ( '.jtw-ebook-banner' ) ;
11+
912export const extensionButton = document . getElementById ( 'extension-button' ) ;
1013export const extensionButtonText = extensionButton ?
1114 extensionButton . querySelector ( '.button-text' ) :
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import {
1414 publicKeyTextArea ,
1515 codeElements ,
1616 debuggerSection ,
17+ extensionSection ,
18+ ebookSection
1719} from './dom-elements.js' ;
1820
1921/* For initialization, look at the end of this file */
@@ -57,9 +59,7 @@ function loadToken() {
5759}
5860
5961function 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 ) {
6363 extensionSection . style . display = 'block' ;
6464 } else {
6565 ebookSection . style . display = 'block' ;
You can’t perform that action at this time.
0 commit comments