1window.onload = function () { 2 // add_plugin(); 3 $(window).scroll(function () { 4 if ($(this).scrollTop()) { 5 $("#back-to-top").fadeIn(); 6 } else { 7 $("#back-to-top").fadeOut(); 8 } 9 }); 10 $("#back-to-top").click(function () { 11 $("html, body").animate({ scrollTop: 0 }, 300); 12 }); 13 14 $("#expand").on("click", function () { 15 $("#iframehtml5").removeClass("force_half_full_screen"); 16 $("#iframehtml5").addClass("force_full_screen"); 17 $("#_exit_full_screen").removeClass("hidden"); 18 requestFullScreen(document.body); 19 }); 20 21 $("#_exit_full_screen").on("click", cancelFullScreen); 22 23 $(".header__bar--open").on("click", function () { 24 $(".overlay").show(); 25 $(".nav__mobile").css({ 26 transform: "translate(0)", 27 }); 28 }); 29 30 $(".close-nav").on("click", function () { 31 $(".overlay").hide(); 32 $(".nav__mobile").css({ 33 transform: "translate(100%)", 34 }); 35 }); 36 37 $(".overlay").on("click", function () { 38 $(this).hide(); 39 $(".nav__mobile").css({ 40 transform: "translate(100%)", 41 }); 42 }); 43}; 44function openNav() { 45 $(".mobile--header__nav-list").each(function () { 46 if ($(this).hasClass("hidden")) { 47 $(this).removeClass("hidden"); 48 } else { 49 $(this).addClass("hidden"); 50 } 51 }) 52} 53async function paging(p) { 54 await $(".gif").removeClass("hidden"); 55 var url = "/paging.ajax"; 56 $.ajax({ 57 type: "POST", 58 url: url, 59 data: { 60 page: p, 61 title: title, 62 keywords: keywords, 63 tag_id: tag_id, 64 category_id: category_id, 65 field_order: field_order, 66 order_type: order_type, 67 is_hot: is_hot, 68 is_new: is_new, 69 limit: limit, 70 id_game: id_game, 71 }, 72 success: function (xxxx) { 73 $(".gif").addClass("hidden"); 74 if (xxxx !== "") { 75 $("#ajax-append").html(xxxx); 76 var lazyloadThrottleTimeout; 77 lazyloadImages = document.querySelectorAll(".lazy"); 78 (function lazyload() { 79 if (lazyloadThrottleTimeout) { 80 clearTimeout(lazyloadThrottleTimeout); 81 } 82 lazyloadThrottleTimeout = setTimeout(function () { 83 var scrollTop = window.pageYOffset; 84 lazyloadImages.forEach(function (img) { 85 if (img.offsetTop < window.innerHeight + scrollTop) { 86 img.src = img.dataset.src; 87 img.classList.remove("lazy"); 88 } 89 }); 90 }, 20); 91 })(); 92 } 93 }, 94 }); 95} 96document.addEventListener("DOMContentLoaded", function () { 97 var lazyloadImages; 98 if ("IntersectionObserver" in window) { 99 lazyloadImages = document.querySelectorAll(".lazy"); 100 var imageObserver = new IntersectionObserver(function (entries, observer) { 101 entries.forEach(function (entry) { 102 if (entry.isIntersecting) { 103 var image = entry.target; 104 image.src = image.dataset.src; 105 image.classList.remove("lazy"); 106 imageObserver.unobserve(image); 107 } 108 }); 109 }); 110 111 lazyloadImages.forEach(function (image) { 112 imageObserver.observe(image); 113 }); 114 } else { 115 var lazyloadThrottleTimeout; 116 lazyloadImages = document.querySelectorAll(".lazy"); 117 118 function lazyload() { 119 if (lazyloadThrottleTimeout) { 120 clearTimeout(lazyloadThrottleTimeout); 121 } 122 123 lazyloadThrottleTimeout = setTimeout(function () { 124 var scrollTop = window.pageYOffset; 125 lazyloadImages.forEach(function (img) { 126 if (img.offsetTop < window.innerHeight + scrollTop) { 127 img.src = img.dataset.src; 128 img.classList.remove("lazy"); 129 } 130 }); 131 if (lazyloadImages.length == 0) { 132 document.removeEventListener("scroll", lazyload); 133 window.removeEventListener("resize", lazyload); 134 window.removeEventListener("orientationChange", lazyload); 135 } 136 }, 20); 137 } 138 139 document.addEventListener("scroll", lazyload); 140 window.addEventListener("resize", lazyload); 141 window.addEventListener("orientationChange", lazyload); 142 } 143}); 144function add_plugin() { 145 let url = "/add-plugin.ajax"; 146 if ( 147 typeof id_game != "undefined" && 148 typeof url_game != "undefined" && 149 id_game != "" && 150 url_game != "" 151 ) { 152 $.ajax({ 153 type: "POST", 154 url: url, 155 data: { id: id_game, url: url_game }, 156 success: function (data) { 157 if (data) { 158 let html = JSON.parse(data); 159 if (html.html_rate) { 160 $("#append-rate").html(html.html_rate); 161 } 162 if (html.html_comment) { 163 $("#append-comment").html(html.html_comment); 164 } 165 } 166 }, 167 }); 168 } 169} 170 171function theaterMode() { 172 let iframe = document.querySelector("#iframehtml5"); 173 const hideThreaterCol = $(".game__suggest-col"); 174 if (!hideThreaterCol.hasClass("hidden")) { 175 hideThreaterCol.addClass("hidden"); 176 } else { 177 hideThreaterCol.removeClass("hidden"); 178 } 179} 180 181function copyToClipboard(element) { 182 var $temp = $("<input>"); 183 $("body").append($temp); 184 $temp.val($(element).attr("href")).select(); 185 document.execCommand("copy"); 186 $temp.remove(); 187} 188function runValidate() { 189 jQuery("#contact-form").validate({ 190 focusInvalid: false, 191 onfocusout: false, 192 ignore: ".ignore", 193 rules: { 194 Name: { 195 required: true,
196 maxlength: 255, 197 }, 198 Email: { 199 required: true, 200 email: true, 201 maxlength: 100, 202 }, 203 Website: { 204 required: false, 205 maxlength: 255, 206 }, 207 Topic: { 208 required: false, 209 maxlength: 255, 210 }, 211 Message: { 212 required: true, 213 maxlength: 65525, 214 }, 215 hiddenRecaptcha: { 216 required: function () { 217 if (grecaptcha.getResponse() == "") { 218 return true; 219 } else { 220 return false; 221 } 222 }, 223 }, 224 }, 225 messages: { 226 Name: { 227 required: "Please type your name!", 228 maxlength: "255", 229 }, 230 Email: { 231 required: "Please type your email!", 232 email: "Please check a valid email!", 233 maxlength: "100", 234 }, 235 Message: { 236 required: "Please type your message!", 237 maxlength: "65525", 238 }, 239 hiddenRecaptcha: { 240 required: "Please verify you are human!", 241 }, 242 }, 243 submitHandler: function () { 244 let question_ajax = "/make-contact.ajax"; 245 let name = jQuery("#Name").val(); 246 let email = jQuery("#Email").val(); 247 let website = jQuery("#Website").val(); 248 let subject = jQuery("#Topic").val(); 249 let message = jQuery("#Message").val(); 250 let metadataload = {}; 251 metadataload.name = name; 252 metadataload.email = email; 253 metadataload.website = website; 254 metadataload.subject = subject; 255 metadataload.message = message; 256 jQuery.ajax({ 257 url: question_ajax, 258 data: metadataload, 259 type: "POST", 260 success: function (data) { 261 if (data != 0 || data != "0") { 262 showSuccessMessage(); 263 } 264 }, 265 }); 266 }, 267 }); 268} 269function showSuccessMessage(message) { 270 document.getElementById("fcf-status").innerHTML = ""; 271 document.getElementById("fcf-form").style.display = "none"; 272 document.getElementById("fcf-thank-you").style.display = "block"; 273} 274 275function resetFormDemo() { 276 document.getElementById("fcf-form").style.display = "block"; 277 document.getElementById("fcf-thank-you").style.display = "none"; 278} 279function copyToClipboard(element) { 280 var $temp = $("<input>"); 281 $("body").append($temp); 282 $temp.val($(element).attr("href")).select(); 283 document.execCommand("copy"); 284 $temp.remove(); 285} 286function requestFullScreen(element) { 287 // Supports most browsers and their versions. 288 var requestMethod = 289 element.requestFullScreen || 290 element.webkitRequestFullScreen || 291 element.mozRequestFullScreen || 292 element.msRequestFullScreen; 293 if (requestMethod) { 294 // Native full screen. 295 requestMethod.call(element); 296 } else if (typeof window.ActiveXObject !== "undefined") { 297 // Older IE. 298 var wscript = new ActiveXObject("WScript.Shell"); 299 if (wscript !== null) { 300 wscript.SendKeys("{F11}"); 301 } 302 } 303} 304 305function cancelFullScreen() { 306 $("#_exit_full_screen").addClass("hidden"); 307 $("#iframehtml5").removeClass("force_full_screen force_half_full_screen"); 308 var requestMethod = 309 document.cancelFullScreen || 310 document.webkitCancelFullScreen || 311 document.mozCancelFullScreen || 312 document.exitFullScreenBtn; 313 if (requestMethod) { 314 // cancel full screen. 315 requestMethod.call(document); 316 } else if (typeof window.ActiveXObject !== "undefined") { 317 // Older IE. 318 var wscript = new ActiveXObject("WScript.Shell"); 319 if (wscript !== null) { 320 wscript.SendKeys("{F11}"); 321 } 322 } 323} 324 325if (document.addEventListener) { 326 document.addEventListener("webkitfullscreenchange", exitHandler, false); 327 document.addEventListener("mozfullscreenchange", exitHandler, false); 328 document.addEventListener("fullscreenchange", exitHandler, false); 329 document.addEventListener("MSFullscreenChange", exitHandler, false); 330} 331 332function exitHandler() { 333 if ( 334 document.webkitIsFullScreen === false || 335 document.mozFullScreen === false || 336 document.msFullscreenElement === false 337 ) { 338 cancelFullScreen(); 339 } 340}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.