Przeglądaj źródła

index fixed bug

andy 3 lat temu
rodzic
commit
dcf2aa8e79
1 zmienionych plików z 34 dodań i 35 usunięć
  1. 34 35
      index.html

+ 34 - 35
index.html

@@ -149,19 +149,18 @@
         <img class="homepage-line" src="/img/titleline.png" alt="">
 
         <!-- <img class="homepage-line" src="/img/" alt=""> -->
-        <div class="my-element" id="ad_dialog">
+        <!-- <div class="my-element" id="ad_dialog">
             <div class="wrap container-fluid px-0 mx-0">
                 <div class="adv-banner">
 
                     <video id="MovieShow" loop>
-                        <!-- <source src="video/test.ogg" type="video/ogg"> -->
                         <source src="./img/應用案例 -- 氣象報導.mp4" type="video/mp4">
                         您的瀏覽器不支援此 HTML5 影片標籤
                     </video>
                     <br><br>
                 </div>
             </div>
-        </div>
+        </div> -->
     </section>
     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
         integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
@@ -208,51 +207,51 @@
     </script>
 
     <script>
-        $("#ad_dialog").hide();
+        // $("#ad_dialog").hide();
 
         // var showSecondsNum = document.getElementById('seconds-number');
         // var showDialogTimeNum = document.getElementById('dialog-time');
-        var defaultNum = 10;
-        var maxTime = defaultNum;
-        var intervalId;
+        // var defaultNum = 10;
+        // var maxTime = defaultNum;
+        // var intervalId;
 
         // showSecondsNum.innerHTML = maxTime;
 
-        var time = maxTime;
+        // var time = maxTime;
 
-        $('body').on('keydown mousemove mousedown', function (e) {
-            time = maxTime; // Reset
-        });
-        runSetInterval();
+        // $('body').on('keydown mousemove mousedown', function (e) {
+        //     time = maxTime; // Reset
+        // });
+        // runSetInterval();
 
-        function runSetInterval() {
-            intervalId = setInterval(function () {
-                time--;
-                // showSecondsNum.innerHTML = time;
-                if (time <= 0) {
-                    ShowInvalidLoginMessage();
-                    clearInterval(intervalId);
-                }
-            }, 1000)
-        }
+        // function runSetInterval() {
+        //     intervalId = setInterval(function () {
+        //         time--;
+        //         // showSecondsNum.innerHTML = time;
+        //         if (time <= 0) {
+        //             ShowInvalidLoginMessage();
+        //             clearInterval(intervalId);
+        //         }
+        //     }, 1000)
+        // }
 
-        function ShowInvalidLoginMessage() {
-            $('#ad_dialog').show();
-            playvideo();
-        }
+        // function ShowInvalidLoginMessage() {
+        //     $('#ad_dialog').show();
+        //     playvideo();
+        // }
 
-        function playvideo() {
-            document.getElementById("MovieShow").play();
+        // function playvideo() {
+        //     document.getElementById("MovieShow").play();
 
-        }
+        // }
 
-        $("#MovieShow").click(function () {
-            // alert( "Handler for .click() called." );
-            document.getElementById("MovieShow").pause();
+        // $("#MovieShow").click(function () {
+        //     // alert( "Handler for .click() called." );
+        //     document.getElementById("MovieShow").pause();
 
-            $('#ad_dialog').hide();
-            location.reload()
-        });
+        //     $('#ad_dialog').hide();
+        //     location.reload()
+        // });
     </script>
 </body>