|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| 7 | + <style type="text/css"> |
| 8 | + p { |
| 9 | + margin: 0; |
| 10 | + } |
| 11 | + |
| 12 | + *, |
| 13 | + *::before, |
| 14 | + *::after { |
| 15 | + box-sizing: border-box; |
| 16 | + } |
| 17 | + |
| 18 | + .overlay, |
| 19 | + .scare { |
| 20 | + position: fixed; |
| 21 | + top: 0; |
| 22 | + left: 0; |
| 23 | + height: 100vh; |
| 24 | + width: 100vw; |
| 25 | + } |
| 26 | + |
| 27 | + p.overlay-title { |
| 28 | + font-size: 24px; |
| 29 | + font-weight: 900; |
| 30 | + color: black; |
| 31 | + line-height: 1; |
| 32 | + margin-bottom: 16px; |
| 33 | + } |
| 34 | + |
| 35 | + .overlay-button { |
| 36 | + display: inline-flex; |
| 37 | + align-items: center; |
| 38 | + height: 40px; |
| 39 | + padding-right: 24px; |
| 40 | + padding-left: 24px; |
| 41 | + font-size: 16px; |
| 42 | + font-weight: 500; |
| 43 | + line-height: 1; |
| 44 | + border-radius: 4px; |
| 45 | + margin: 4px; |
| 46 | + cursor: pointer; |
| 47 | + } |
| 48 | + |
| 49 | + .overlay-buttons-wrapper { |
| 50 | + margin: 24px -8px -8px; |
| 51 | + } |
| 52 | + |
| 53 | + #accept-button { |
| 54 | + background-color: rgb(255, 0, 0); |
| 55 | + color: white; |
| 56 | + } |
| 57 | + |
| 58 | + #decline-button { |
| 59 | + color: rgb(0, 0, 0); |
| 60 | + border: 2px solid rgb(0, 0, 0); |
| 61 | + } |
| 62 | + |
| 63 | + p.overlay-description { |
| 64 | + font-size: 16px; |
| 65 | + font-weight: 400; |
| 66 | + color: rgba(0, 0, 0, 0.5); |
| 67 | + line-height: 1.25; |
| 68 | + margin-bottom: 16px; |
| 69 | + } |
| 70 | + |
| 71 | + a.overlay-link { |
| 72 | + display: inline-block; |
| 73 | + text-decoration: none; |
| 74 | + font-size: 16px; |
| 75 | + font-weight: 500; |
| 76 | + color: rgb(255, 0, 0); |
| 77 | + line-height: 1; |
| 78 | + position: relative; |
| 79 | + margin-top: 16px; |
| 80 | + } |
| 81 | + |
| 82 | + a.overlay-link::before { |
| 83 | + position: absolute; |
| 84 | + content: ""; |
| 85 | + height: calc(50% + 4px); |
| 86 | + width: calc(100% + 8px); |
| 87 | + bottom: -4px; |
| 88 | + left: -4px; |
| 89 | + background-color: rgba(132, 94, 194, 0.1); |
| 90 | + } |
| 91 | + |
| 92 | + .overlay-body { |
| 93 | + max-width: 512px; |
| 94 | + text-align: center; |
| 95 | + font-family: "Inter", sans-serif; |
| 96 | + } |
| 97 | + |
| 98 | + .overlay[hidden] { |
| 99 | + display: none; |
| 100 | + } |
| 101 | + |
| 102 | + .overlay { |
| 103 | + z-index: 2; |
| 104 | + display: flex; |
| 105 | + align-items: center; |
| 106 | + justify-content: center; |
| 107 | + background-image: url(https://iw233.cn/api/Random.php); |
| 108 | + background-repeat: no-repeat; |
| 109 | + background-size: cover; |
| 110 | + background-position: center 0; |
| 111 | + } |
| 112 | + |
| 113 | + .text-bg { |
| 114 | + background-color: rgba(255, 255, 255, 0.6); |
| 115 | + padding: 24px; |
| 116 | + } |
| 117 | + |
| 118 | + .scare { |
| 119 | + z-index: 1; |
| 120 | + } |
| 121 | + |
| 122 | + video#video { |
| 123 | + height: 100%; |
| 124 | + width: 100%; |
| 125 | + object-fit: cover; |
| 126 | + } |
| 127 | + |
| 128 | + video#video::-webkit-media-controls-enclosure { |
| 129 | + display: none !important; |
| 130 | + } |
| 131 | + </style> |
| 132 | +</head> |
| 133 | + |
| 134 | +<body> |
| 135 | + <div id="overlay" class="overlay"> |
| 136 | + <div class="text-bg"> |
| 137 | + <div class="overlay-body"> |
| 138 | + <p class="overlay-title">您是否已满18岁</p> |
| 139 | + <p class="overlay-description">以下内容可能不适合<b>未满18岁</b>的人群观看,我们需要确认您的年龄。</p> |
| 140 | + <p class="overlay-description">The following may not be suitable for people <b>under the age of |
| 141 | + 18</b> and we need to confirm your age.</p> |
| 142 | + <div class="overlay-buttons-wrapper"> |
| 143 | + <div id="accept-button" class="overlay-button">已满18岁</div> |
| 144 | + <div id="decline-button" class="overlay-button">未满18岁</div> |
| 145 | + </div> |
| 146 | + </div> |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + <div class="scare"> |
| 150 | + <video id="video" class="video" src="https://vdse.bdstatic.com/192d9a98d782d9c74c96f09db9378d93.mp4"></video> |
| 151 | + </div> |
| 152 | + <script type="text/javascript"> |
| 153 | + const video = document.getElementById("video"); |
| 154 | + const overlay = document.getElementById("overlay"); |
| 155 | + const declineButton = document.getElementById("decline-button"); |
| 156 | + const acceptButton = document.getElementById("accept-button"); |
| 157 | + video.addEventListener("ended", function () { |
| 158 | + window.location.href = "https://arcxingye.github.io/rr/qrcode"; |
| 159 | + }); |
| 160 | + function buttonClick1(event) { |
| 161 | + event.preventDefault(); |
| 162 | + overlay.hidden = true; |
| 163 | + video.play(); |
| 164 | + videoClick(); |
| 165 | + } |
| 166 | + function buttonClick2(event) { |
| 167 | + window.open("https://xingye.me/game/index.php"); |
| 168 | + } |
| 169 | + function videoClick(event) { |
| 170 | + if (event) event.preventDefault(); |
| 171 | + const { documentElement } = document; |
| 172 | + if (documentElement.requestFullscreen) documentElement.requestFullscreen(); |
| 173 | + else if (documentElement.mozRequestFullScreen) documentElement.mozRequestFullScreen(); |
| 174 | + else if (documentElement.webkitRequestFullscreen) documentElement.webkitRequestFullscreen(); |
| 175 | + else if (documentElement.msRequestFullscreen) documentElement.msRequestFullscreen(); |
| 176 | + } |
| 177 | + acceptButton.addEventListener("click", buttonClick1); |
| 178 | + declineButton.addEventListener("click", buttonClick2); |
| 179 | + video.addEventListener("click", videoClick); |
| 180 | + </script> |
| 181 | +</body> |
| 182 | + |
| 183 | +</html> |
0 commit comments