File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ const linkStartBtn = document . getElementById ( 'linkStartBtn' ) ;
2+ const linkStartVideo = document . getElementById ( 'linkStartVideo' ) ;
3+ const linkStartAudio = new Audio ( './assets/videos-audios/link-start.mp3' ) ;
4+
5+ function openFullscreen ( ) {
6+ /*
7+ Opens video on FullScreen automatically
8+ */
9+
10+ /* Chrome, Opera, Vivaldi... */
11+ if ( linkStartVideo . requestFullscreen ) { linkStartVideo . requestFullscreen ( ) ; }
12+
13+ /* Safari */
14+ else if ( linkStartVideo . webkitRequestFullscreen ) { linkStartVideo . webkitRequestFullscreen ( ) ; }
15+
16+ /* IE11 */
17+ else if ( linkStartVideo . msRequestFullscreen ) { linkStartVideo . msRequestFullscreen ( ) ; }
18+ }
19+
20+ linkStartBtn . addEventListener ( 'click' , ( ) => {
21+ /*
22+ When 'old version button' is clicked, the video
23+ is open on full screen and played automatically
24+ */
25+ alert ( 'We are moving to the Old Version. Enjoy yourself! 😊' ) ;
26+ linkStartVideo . style . display = 'block' ;
27+ openFullscreen ( ) ;
28+ linkStartAudio . play ( ) ;
29+ } ) ;
30+
31+ linkStartVideo . addEventListener ( 'ended' , ( ) => {
32+ window . location . href = './old/index.html' ;
33+ alert ( 'Loading has been successfully completed! ✔️' ) ;
34+ } ) ;
You can’t perform that action at this time.
0 commit comments