1/* 2 3 TABLE OF CONTENT 4 5 - LAZY LOAD - STANDARD IMG 6 - BACKGROUND LAZY LOAD 7 - HAMBURGER MENU 8 - SMOOTH SCROLL ERROR ON GOOGLE LIGHTHOUSE FIX 9 - ARTICLES OWL CAROUSEL 10 11 12*/ 13 14 15(function($) { 16 17 18 19$(document).on('click', 'a[href^="#"]', function (event) { 20 event.preventDefault(); 21 22 $('html, body').animate({ 23 scrollTop: $($.attr(this, 'href')).offset().top - 120 24 }, 500); 25}); 26 27 28// [ LAZY LOAD - STANDARD IMG ] 29 30const targets = document.querySelectorAll("img"); 31 32const lazyLoad = (target) => { 33 const io = new IntersectionObserver((entries, observer) => { 34 entries.forEach((entry) => { 35 if (entry.isIntersecting) { 36 const img = entry.target; 37 const src = img.getAttribute("data-lazy"); 38 if (src) { 39 img.setAttribute("src", src); 40 img.classList.add("fade"); 41 } 42 43 observer.disconnect(); 44 } 45 }); 46 }); 47 48 io.observe(target); 49}; 50 51targets.forEach(lazyLoad); 52 53// [ BACKGROUND LAZY LOAD ] 54 55$(window).load(function () { 56 $(".lazyloadBG").each(function () { 57 var lazy = $(this); 58 var src = lazy.attr("data-background"); 59 60 $(this).css("background-image", 'url("' + src + '")'); 61 }); 62}); 63 64// [ HAMBURGER MENU ] 65 66$(document).ready(function () { 67 $(".menu-wrapper").on("click", function () { 68 $(this).toggleClass("fixed"); 69 $(".hamburger-menu").toggleClass("animate"); 70 $(".header-menu").fadeToggle(); 71 }); 72}); 73 74 75// [ SMOOTH SCROLL ERROR ON GOOGLE LIGHTHOUSE FIX ] 76 77jQuery.event.special.touchstart = 78{ 79 setup: function( _, ns, handle ) 80 { 81 if ( ns.includes("noPreventDefault") ) 82 { 83 this.addEventListener("touchstart", handle, { passive: false }); 84 } 85 else 86 { 87 this.addEventListener("touchstart", handle, { passive: true }); 88 } 89 } 90}; 91 92 93 94 95 96// carousels 97$(document).ready(function(){ 98 // [ ARTICLES OWL CAROUSEL ] 99 100 $('.articles-carousel').owlCarousel({ 101 margin:25, 102 dots:true, 103 nav:true, 104 responsive:{ 105 0:{ 106 items:1 107 }, 108 600:{ 109 items:3 110 }, 111 1000:{ 112 items:4 113 } 114 } 115 }); 116 117 // [ COMPANY SCREENSHOTS OWL CAROUSEL ] 118 119 120 $('.company-gallery').owlCarousel({ 121 margin:25, 122 dots:true, 123 nav:true, 124 lazyLoad:true, 125 dotsContainer: '#carousel-custom-dots-gallery', 126 responsive:{ 127 0:{ 128 items:1 129 } 130 } 131 }); 132 133 $('.gallery-arrows .arrow-left').click(function() { 134 $('.company-gallery').trigger('prev.owl.carousel'); 135 }); 136 137 $('.gallery-arrows .arrow-right').click(function() { 138 $('.company-gallery').trigger('next.owl.carousel'); 139 }); 140 141 $('.company-mobile-gallery').owlCarousel({ 142 margin:0, 143 dots:false, 144 nav:false, 145 lazyLoad:true, 146 items: 1 147 }); 148 149 $('.mobile-gallery-slider-arrows .arrow-left').click(function() { 150 $('.company-mobile-gallery').trigger('prev.owl.carousel'); 151 }); 152 153 $('.mobile-gallery-slider-arrows .arrow-right').click(function() { 154 $('.company-mobile-gallery').trigger('next.owl.carousel'); 155 }); 156 157 158}); 159 160 161 162 163 164 165 166 167 168// [ IFRAME LAZY ] 169 170$(window).load(function () { 171 172 $("iframe").each(function(){ 173 if ( $(this).attr("data-src") ) { 174 $(this).attr("src", $(this).attr('data-src') ); 175 } 176 }); 177 178}); 179 180 181 182// CLICK ANYWWHRE ON DIV OPEN LINK IN NEW TAB 183 184 185$(document).on('click','.trigerLikeLink',function(event){ 186 187 if ( event.target.tagName.toLowerCase() != 'a' ) { 188 openInNewTab( $(this).attr("data-link") ); 189 } else { 190 window.location.href == $(this).attr("href"); 191 } 192 193 194}); 195 196function openInNewTab(url) { 197 var win = window.open(url, '_blank'); 198 win.focus(); 199} 200 201$(document).on('click','.mobile-open-dropdown',function(event){ 202 event.preventDefault(); 203 event.stopPropagation(); 204 205 var mobileInfo = $(this).closest(".company-list-item").find(".company-mobile-dropdown"); 206 207 if ( $(mobileInfo).is(":visible") ) { 208 $(mobileInfo).slideUp(); 209 $(this).removeClass("rotate"); 210 } else { 211 $(mobileInfo).slideDown({ 212 start: function () { 213 $(this).css({ 214 display: "flex" 215 }); 216 } 217 }); 218 $(this).addClass("rotate"); 219 } 220 221 222}); 223 224 225 226// FADEIN LOAD CONTENT 227 228/* window.addEventListener('load', (event) => { 229 $("desktop").addClass("show"); 230});*/ 231 232 233 234 235 236 237 238 239// REMOVE THUMBNAIL AND PLAY VIDEO 240$(document).on('click','.article-video .overlay-video .playvideo',function(){ 241 242 var parent = $(this).closest(".video-field"); 243 244 var isVideo = $(parent).find("video").length; 245 var isIframe = $(parent).find("iframe").length; 246 247 if (isVideo == 1) { 248 $(parent).find("video").attr("src", $(parent).find("video").attr("data-source")); 249 $(parent).find("video").trigger('play'); 250 } 251 252 else if (isIframe == 1) { 253 254 $(parent).find("iframe").attr("src", $(parent).find("iframe").attr("data-source")); 255 256 } 257 258 $(this).closest(".overlay-video").fadeOut(); 259 260 261 262 263}); 264 265 266 267 268// ON BACK BUTTON RECHECK IF PAGE 269 270window.addEventListener('popstate', function(event) { 271 272 273 274 275 location.reload(); 276 277 278 279}, false); 280 281 282 283})(jQuery); 284 285(function() { 286 // --- CONFIGURATION --- 287 288 // 1. Define your whitelist 289 // You can add as many domains here as you like. 290 var allowedDomains = [ 291 'casinoweb.gr', // Your main site 292 'localhost', // Local development 293 'asrv.dalecta.com' // Ads servers 294 ]; 295 296 var endpoint = 'https://www.casinoweb.gr/?action=report_thief'; 297 298 // --- LOGIC --- 299 300 var currentHost = window.location.hostname; 301 var isSafe = false;
302 303 // 2. Loop through the allowed list 304 for (var i = 0; i < allowedDomains.length; i++) { 305 // If the current hostname contains one of our allowed domains... 306 if (currentHost.indexOf(allowedDomains[i]) > -1) { 307 isSafe = true; 308 break; // Match found, stop checking 309 } 310 } 311 312 // 3. If it is NOT safe, report it 313 if (!isSafe) { 314 var thiefUrl = encodeURIComponent(window.location.href); 315 var cacheBuster = Math.random(); 316 317 var reportUrl = endpoint + '&url=' + thiefUrl + '&cb=' + cacheBuster; 318 319 new Image().src = reportUrl; 320 321 // window.location.href = 'https://www.casinoweb.gr'; 322 } 323})();
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.