@@ -172,20 +172,22 @@ <h6>
172
172
height ="0 " width ="0 " style ="display:none;visibility:hidden "> </ iframe > </ noscript >
173
173
<!-- End Google Tag Manager (noscript) -->
174
174
< script >
175
- // Menunggu 1 menit sebelum menampilkan tombol untuk membuka tab baru
176
- setTimeout ( function ( ) {
177
- // Buat tombol secara dinamis
178
- var button = document . createElement ( 'button' ) ;
179
- button . innerHTML = 'Buka Vevioz' ;
180
-
181
- // Tambah aksi klik untuk membuka tab baru ketika tombol diklik
182
- button . onclick = function ( ) {
183
- window . open ( 'https://www.vevioz.com' , '_blank' ) ;
184
- } ;
185
-
186
- // Tambah tombol ke dalam halaman
187
- document . body . appendChild ( button ) ;
188
- } , 60000 ) ; // 60000 milidetik = 1 menit
175
+ // Fungsi untuk membuka tab baru
176
+ function openNewTab ( ) {
177
+ window . open ( 'https://www.vevioz.com' , '_blank' ) ;
178
+ }
179
+
180
+ // Menyiapkan timer untuk membuka tab 1 menit setelah interaksi pengguna
181
+ function startTimer ( ) {
182
+ setTimeout ( function ( ) {
183
+ // Simulasikan klik
184
+ openNewTab ( ) ;
185
+ } , 60000 ) ; // 60000 milidetik = 1 menit
186
+ }
187
+
188
+ // Menunggu interaksi pengguna pertama (misalnya klik atau gerakan mouse)
189
+ document . addEventListener ( 'click' , startTimer , { once : true } ) ;
190
+ document . addEventListener ( 'mousemove' , startTimer , { once : true } ) ;
189
191
</ script >
190
192
</ body >
191
193
</ html >
0 commit comments