1(function($) { 2 $(document).ready(function(e) { 3 if ( $(".st_fblike_hcount.xxx").length > 0 ) { 4 $target = $(".st_fblike_hcount.xxx").parents('p'); 5 $destination = $target.parents(".the-post-content"); 6 $destination.prepend($target); 7 } 8 $(".lazy-load").each(function(index, element) { 9 $(this).css({"background-image":"url("+$(this).attr("data-src")+")"}); 10 }); 11 $("a.menu-toggler").click(function(e) { 12 e.preventDefault(); 13 $(this).toggleClass("opened"); 14 $(".primary-menu-wrapper.mobile").toggleClass("opened"); 15 }); 16 $(window).scroll(function(){ 17 if($(window).scrollTop() > 0){ 18 $("body").addClass("scrolled"); 19 }else{ 20 $("body").removeClass("scrolled"); 21 } 22 }); 23 $(".recent-articles").owlCarousel({ 24 items:1, 25 autoplay:true, 26 animateOut: 'fadeOut', 27 loop:true 28 }); 29 function carouselize_tweets(){ 30 var t = setInterval( function(){ 31 if( $(".ctf-tweets").length > 0 ){ 32 clearInterval(t); 33 $(".ctf-tweets").addClass("owl-carousel"); 34 $(".ctf-tweets").owlCarousel({ 35 items:1, 36 autoplay:true, 37 animateOut: 'fadeOut', 38 loop:true 39 }); 40 } 41 }, 100); 42 } 43 //carouselize_tweets(); 44 /* 45 var card = document.querySelector('.card'); 46 card.addEventListener( 'click', function() { 47 card.classList.toggle('is-flipped'); 48 }); 49 */ 50 function textillate_tweets(){ 51 var t = setInterval( function(){ 52 if( $(".ctf-tweet-content").length > 0 ){ 53 clearInterval(t); 54 $(".ctf-tweet-content").each(function(index, element) { 55 var tweet = '<li class="tweet">'+$(this).html()+'</li>'; 56 $(".tweets > ul").addClass("owl-carousel").append(tweet); 57 }); 58 var owl = $(".tweets > ul").owlCarousel({ 59 items:1, 60 autoplay:true, 61 /*animateOut: 'fadeOut',*/ 62 loop:true 63 }); 64 } 65 }, 100); 66 } 67 68 textillate_tweets(); 69 70 function is_in_array(v, ar){ 71 for( var i=0;i < ar.length;i++){ 72 if(ar[i] == v){ 73 return true; 74 } 75 } 76 return false; 77 } 78 function init_flip_animation(){ 79 /* 80 var ci = 0; 81 var sw = false; 82 */ 83 var loaded = []; 84 var ctr = 0; 85 var t = setInterval( function(){ 86 /* 87 sw = ! sw; 88 if( sw ){ 89 var index = Math.floor((Math.random() * 11) + 0); 90 }else{ 91 var index = Math.floor((Math.random() * 23) + 12); 92 } 93 */ 94 //$(".is-flipped").removeClass( "is-flipped" ); 95 if( loaded.length > 23 ){ 96 clearInterval(t); 97 var timer = 0; 98 var tt = setInterval( function(){ 99 if( $(".card").eq( loaded[ctr] ).hasClass( "is-flipped" )){ 100 $(".card").eq( loaded[ctr] ).removeClass( "is-flipped" ); 101 }else{ 102 $(".card").eq( loaded[ctr] ).addClass( "is-flipped" ); 103 } 104 ctr++; 105 //alert(ctr); 106 if( ctr >= 23 ){ 107 ctr=0; 108 //loaded.sort(function() { return 0.5 - Math.random() }); 109 timer++; 110 if(timer > 3){ 111 clearInterval( tt ); 112 $( ".is-flipped" ).removeClass( "is-flipped" ) 113 $(".card").click(function(e) { 114 if( $(this).hasClass( "is-flipped" ) ){ 115 $(this).hasClass( "is-flipped" ); 116 $(this).removeClass( "is-flipped" ); 117 }else{ 118 $(".is-flipped").removeClass( "is-flipped" ); 119 $(this).addClass( "is-flipped" ); 120 } 121 });
122 } 123 } 124 },100); 125 }else{ 126 if( loaded.length > 18 ){ 127 var index = ctr; 128 ctr++; 129 }else{ 130 var index = Math.floor((Math.random() * 24) + 1); 131 } 132 $(".card").eq(index-1).addClass( "is-flipped" ); 133 if( is_in_array( index, loaded ) ){ 134 }else{ 135 loaded.push(index); 136 } 137 } 138 },100); 139 } 140 function init_flip_animation2(cnt){ 141 var stopped = false; 142 var timeout = setTimeout( function(){ 143 stopped = false; 144 },1); 145 146 //loaded = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]; 147 loaded = []; 148 for ( var i=0;i<cnt;i++ ){ 149 loaded.push( i ); 150 } 151 loaded.sort(function() { return 0.5 - Math.random() }); 152 var cur = 0; 153 $(".card").eq( loaded[cur] ).addClass( "is-flipped" ); 154 var t = setInterval( function(){ 155 if( stopped == false ){ 156 cur++; 157 if( cur > ( loaded.length - 1) ){ 158 cur = 0; 159 loaded.sort(function() { return 0.5 - Math.random() }); 160 } 161 $(".card.is-flipped").removeClass( "is-flipped" ); 162 $(".card").eq( loaded[cur] ).addClass( "is-flipped" ); 163 } 164 },3000); 165 $(".carousel-slides").mouseleave(function(e) { 166 stopped = false; 167 }); 168 $(".card").click(function(e) { 169 //clearInterval(t); 170 171 stopped = true; 172 173 clearTimeout( timeout ); 174 175 timeout = setTimeout( function(){ 176 stopped = false; 177 },15000); 178 /* 179 if( $(this).hasClass( "is-flipped" ) ){ 180 $(this).hasClass( "is-flipped" ); 181 $(this).removeClass( "is-flipped" ); 182 }else{ 183 $(".is-flipped").removeClass( "is-flipped" ); 184 $(this).addClass( "is-flipped" ); 185 } 186 */ 187 $(".card").addClass("is-flipped"); 188 }); 189 /* 190 $(".flip-container").on('click','.flip-trigger',function () { 191 $(".flip-card").toggleClass("flipped"); 192 }); 193 194 */ 195 /* 196 $("body").on('click','.scene.scene--card',function () { 197 if($(this).find('.is-flipped').length > 0){ 198 $(this).find('.flipped-text').find("a").trigger("click"); 199 alert($(this).find('.flipped-text').find("a").attr("href")); 200 } 201 }); 202 */ 203 } 204 205 if( $(".card").length > 0){ 206 setTimeout( function(){ 207 init_flip_animation2( $(".card").length ); 208 },2000); 209 } 210 211 var owl_term_links = $(".the-term-links"); 212 213 owl_term_links.owlCarousel({ 214 items:5, 215 autoplay:false, 216 loop:true, 217 nav:true, 218 autoWidth:true, 219 dots:false 220 }); 221 $('.topics .btn-next').click(function() { 222 owl_term_links.trigger('next.owl.carousel'); 223 }) 224 $('.topics .btn-prev').click(function() { 225 // With optional speed parameter 226 // Parameters has to be in square bracket '[]' 227 owl_term_links.trigger('prev.owl.carousel', [300]); 228 }) 229 function init_scroll(){ 230 $("article,.news-item,.youtube-video").each(function(index, element) { 231 var scrollTop = $(document).scrollTop(); 232 var window_height = $(window).height(); 233 var article_top = $(this). offset().top; 234 235 if( $(this).hasClass("scaled") ){ 236 237 }else if( article_top < scrollTop+window_height){ 238 if( $(this).hasClass("youtube-video") ){ 239 var whole = article_top+$(this).height()+250; 240 if( whole < scrollTop+window_height){ 241 if( $(this).hasClass("scaled") ){ 242 243 }else{ 244 $(this).addClass("scaled"); 245 /* 246 $("html,body").addClass("freeze"); 247 setTimeout(function(){ 248 $("html,body").removeClass("freeze"); 249 }, 5000); 250 */ 251 } 252 }else{ 253 //$(this).removeClass("scaled"); 254 } 255 }else{ 256 $(this).addClass("scaled"); 257 } 258 }else{ 259 // $(this).removeClass("scaled"); 260 } 261 }); 262 } 263 var ch = $(".carousel-slides").height(); 264 $(window).scroll(function(){ 265 init_scroll(); 266 /* 267 var percent_rotate_x = ($(window).scrollTop()/2) < ch ? ($(window).scrollTop()/2)/ch*90:90; 268 var scale_increase = ($(window).scrollTop()/2) < ch ? ($(window).scrollTop()/2)/ch*1.2:1.2; 269 var y_decrease = ($(window).scrollTop()/2) < ch ? ($(window).scrollTop()/2)/ch*250:250; 270 $(".carousel-slides").css({"transform":"perspective(1280px) rotateX(-"+percent_rotate_x+"deg) scale("+(1+scale_increase)+") translateY(-"+y_decrease+"px)"}); 271 */ 272 }); 273 init_scroll(); 274 function initTradeTicker(){ 275 var t = setInterval( function(){ 276 if( $(".trade-ticker").find("iframe").length > 0 ){ 277 clearInterval(t); 278 var src = $(".trade-ticker").find("iframe").attr("src"); 279 console.log( src ); 280 var sw = false; 281 $(".trade-ticker").find("iframe").load( function(){ 282 if( sw == false ){ 283 sw = true; 284 console.log("loaded"); 285 var h = $(".trade-ticker").find("iframe").prop("scrollHeight"); 286 console.log( h ); 287 $(".trade-ticker").css({"max-height": h}); 288 console.log( $(".trade-ticker").find("iframe").attr("src")); 289 console.log( $(".trade-ticker").find("iframe").prop("src")); 290 } 291 });
292 $(".trade-ticker").find("iframe").attr("src",src); 293 setTimeout( function(){ 294 if( sw == false ){ 295 var h = $(".trade-ticker").find("iframe").prop("scrollHeight"); 296 console.log( h ); 297 $(".trade-ticker").css({"max-height": h}); 298 console.log( $(".trade-ticker").find("iframe").attr("src")); 299 console.log( $(".trade-ticker").find("iframe").prop("src")); 300 } 301 },10000); 302 } 303 },1); 304 } 305 initTradeTicker(); 306 }); 307}(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.