File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -8,18 +8,19 @@ ready(function () {
88 // Reveal #slowPostMessage after a delay (default 30000 ms).
99 // If you want to change the delay per page, set data-slow-post-delay on the element.
1010 const el = document . getElementById ( 'slowPostMessage' ) ;
11- const pageTitle = document . getElementById ( 'page-title' ) ;
12- if ( ! el ) return ;
13- const attr = ( el . dataset && el . dataset . slowPostDelay ) || el . getAttribute ( 'data-slow-post-delay' ) ;
14- let delay = parseInt ( attr , 10 ) ;
15- if ( ! Number . isFinite ( delay ) || delay < 0 ) delay = 30000 ;
11+ if ( el ) {
12+ const pageTitle = document . getElementById ( 'page-title' ) ;
13+ const attr = ( el . dataset && el . dataset . slowPostDelay ) || el . getAttribute ( 'data-slow-post-delay' ) ;
14+ let delay = parseInt ( attr , 10 ) ;
15+ if ( ! Number . isFinite ( delay ) || delay < 0 ) delay = 30000 ;
1616
17- setTimeout ( function ( ) {
17+ setTimeout ( function ( ) {
1818 el . classList . remove ( 'hidden' ) ;
1919 if ( pageTitle ) {
20- pageTitle . classList . remove ( 'hidden' ) ;
20+ pageTitle . classList . remove ( 'hidden' ) ;
2121 }
22- } , delay ) ;
22+ } , delay ) ;
23+ }
2324
2425 // Automatically click the input button to redirect the user to
2526 // the SSO
You can’t perform that action at this time.
0 commit comments