1 2gsap.registerPlugin(ScrollTrigger); 3// const tslide = gsap.timeline({ defaults: { opacity: 1, ease: "back" } }) 4window.onbeforeunload = function () { 5 var scrollPos; 6 if (typeof window.pageYOffset != 'undefined') { 7 scrollPos = window.pageYOffset; 8 } 9 else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { 10 scrollPos = document.documentElement.scrollTop; 11 } 12 else if (typeof document.body != 'undefined') { 13 scrollPos = document.body.scrollTop; 14 } 15 document.cookie = "scrollTop=" + scrollPos; 16} 17 18function init() { 19 const prod = document.querySelectorAll('.prod-box'); 20 prod.forEach((prod) => { 21 gsap.from(prod, { 22 opacity: 0, 23 y: 600, 24 duration: 1, 25 scrollTrigger: { 26 trigger: prod.querySelector('.prod-img'), 27 start: 'top bottom+=600', 28 end: 'bottom bottom', 29 // scrub: 2, 30 // markers: true 31 } 32 }) 33 }); 34} 35window.addEventListener('load', function () { 36 init(); 37}); 38var loadedsite = true; 39function fadeIndex() { 40 if ($('.loader').length > 0) { 41 $(".loader").remove(); 42 $("body").removeClass("loading"); 43 44 } 45} 46(function ($) { 47 if (loadedsite) { 48 setTimeout(function () { 49 fadeIndex(); 50 // }, 2000); 51 }, 1000); 52 } 53 checkScroll(); 54 $(window).scroll(function () { 55 checkScroll(); 56 }); 57 function checkScroll() { 58 var topscr = 50; 59 if ($(window).scrollTop() > topscr) { 60 $('header').addClass('scroll'); 61 $('.logo-main').addClass('scroll-logo'); 62 } 63 if ($(window).scrollTop() < topscr) { 64 $('header').removeClass('scroll'); 65 $('.logo-main').removeClass('scroll-logo'); 66 } 67 } 68 $(".first-button").click(function () { 69 $('.animated-icon3').toggleClass("open"); 70 }); 71 $(".icon-search").click(function () { 72 $('.search-menu').addClass("active"); 73 }); 74 $(".icon-close").click(function () { 75 $('.search-menu').removeClass("active"); 76 }); 77 $('.slider').slick({ 78 infinite: true, 79 speed: 300, 80 slidesToShow: 1 81 }); 82 $('.news-slide').slick({ 83 infinite: true, 84 speed: 300, 85 slidesToShow: 3, 86 responsive: [ 87 { 88 breakpoint: 1200, 89 settings: { 90 slidesToShow: 2 91 } 92 }, 93 { 94 breakpoint: 768, 95 settings: { 96 slidesToShow: 1 97 } 98 } 99 ] 100 }); 101 // Disables ctrl+v, ctrl+x, ctrl+c. 102 $('#mytext').on("cut", function(e) { 103 $("#mytext").text('cut. not allowed!'); 104 e.preventDefault(); 105 }); 106 $('#mytext').on("copy", function(e) { 107 alert("copy. not allowed!"); 108 //$("#mytext").text('copy. not allowed!'); 109 e.preventDefault(); 110 }); 111 $('#mytext').on("paste", function(e) { 112 $("#mytext").text('paste. not allowed!'); 113 e.preventDefault(); 114 }); 115 $('.news-details').on("cut", function(e) { 116 alert("cut. not allowed!"); 117 // $(".news-details").text('cut. not allowed!'); 118 e.preventDefault(); 119 }); 120 $('.news-details').on("copy", function(e) { 121 alert("copy. not allowed!"); 122 // $(".news-details").text('copy. not allowed!'); 123 e.preventDefault(); 124 }); 125 $('.news-details').on("paste", function(e) { 126 $(".news-details").text('paste. not allowed!'); 127 e.preventDefault(); 128 }); 129 // Above all three can be combined into one, above is 130 // executed separately for understanding purposes. 131 /* $('textarea').on("cut copy paste", function(e) { 132 $("#d2").text('right-click is disabled!'); 133 e.preventDefault(); 134 }); */ 135 136 // Disables right-click.
137 $('#mytext').mousedown(function(e) { 138 if (e.button == 2) { 139 e.preventDefault(); 140 alert('right-click is disabled!'); 141 } 142 }); 143 $('.news-details').mousedown(function(e) { 144 if (e.button == 2) { 145 e.preventDefault(); 146 alert('right-click is disabled!'); 147 } 148 }); 149 150 // $('.slider-acc').slick({ 151 // centerMode: true, 152 // centerPadding: '60px', 153 // slidesToShow: 3, 154 // slidesToScroll: 1, 155 // responsive: [ 156 // { 157 // breakpoint: 1024, 158 // settings: { 159 // // arrows: true, 160 // centerMode: true, 161 // centerPadding: '40px', 162 // slidesToShow: 1 163 // } 164 // }, 165 // { 166 // breakpoint: 480, 167 // settings: { 168 // // arrows: false, 169 // centerMode: true, 170 // centerPadding: '40px', 171 // slidesToShow: 1 172 // } 173 // } 174 // ] 175 // }); 176 $(".img-container").popupLightbox({ 177 width: "100%", 178 height: "100vh", 179 }); 180 181}(jQuery));
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.