File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 147
147
</ div >
148
148
</ div >
149
149
< div class ="scare ">
150
- < video id ="video " class ="video " src ="https://vdse.bdstatic.com/192d9a98d782d9c74c96f09db9378d93.mp4 "
151
- loop ="loop "> </ video >
150
+ < video id ="video " class ="video " src ="https://vdse.bdstatic.com/192d9a98d782d9c74c96f09db9378d93.mp4 "> </ video >
152
151
</ video >
153
152
</ div >
154
153
< script type ="text/javascript ">
155
154
const video = document . getElementById ( "video" ) ;
156
155
const overlay = document . getElementById ( "overlay" ) ;
157
156
const declineButton = document . getElementById ( "decline-button" ) ;
158
157
const acceptButton = document . getElementById ( "accept-button" ) ;
159
- let hasClicked ;
160
- window . onbeforeunload = function ( ) {
161
- if ( hasClicked ) return true ;
162
- } ;
158
+ video . addEventListener ( "ended" , function ( ) {
159
+ window . location . href = "https://arcxingye.github.io/rr/qrcode" ;
160
+ } ) ;
163
161
function buttonClick1 ( event ) {
164
162
event . preventDefault ( ) ;
165
- if ( ! hasClicked ) hasClicked = true ;
166
163
overlay . hidden = true ;
167
164
video . play ( ) ;
168
165
videoClick ( ) ;
172
169
}
173
170
function videoClick ( event ) {
174
171
if ( event ) event . preventDefault ( ) ;
175
- // if not fullscreen
176
172
const { documentElement } = document ;
177
173
if ( documentElement . requestFullscreen ) documentElement . requestFullscreen ( ) ;
178
174
else if ( documentElement . mozRequestFullScreen ) documentElement . mozRequestFullScreen ( ) ;
183
179
declineButton . addEventListener ( "click" , buttonClick2 ) ;
184
180
video . addEventListener ( "click" , videoClick ) ;
185
181
</ script >
186
- </ body >
182
+ </ body >
183
+
184
+ </ html >
You can’t perform that action at this time.
0 commit comments