PageSourceSearch

https://www.unisg.ch/typo3temp/assets/vhs-assets-cs2_news_slider.js?1790842458

js unisg.ch collected 2026-10-01 08:43:08 UTC 4,452 bytes, 2 lines download raw bytes

1;require(['jquery','swiper','vlite'],function(e,t,i){initNewsSlider=function(i){slidesPerView=1;breakpoints={840:{slidesPerView:2,},1024:{slidesPerView:3,},1280:{slidesPerView:4,}};prev='.swiper-button-prev.d-compact';next='.swiper-button-next.d-compact';if(e(i).hasClass('wide')){slidesPerView=1;breakpoints='';prev='.swiper-button-prev.d-wide';next='.swiper-button-next.d-wide'};autoplay=e(i).data('swiper-autoplay');nslider=new t(i,{slidesPerView:slidesPerView,loop:!1,autoplay:autoplay,touchThreshold:100,watchOverflow:!0,observeParents:!0,spaceBetween:0,watchSlidesVisibility:!0,navigation:{nextEl:e(i).parent().find(next)[0],prevEl:e(i).parent().find(prev)[0],},pagination:{dynamicMainBullets:4,dynamicBullets:!0,el:e(i).parent().find('.swiper-pagination')[0],renderBullet:function(e,t){return'<span class="'+t+'"><span class="innner-circle"></span><span class="outer-circle"></span>'+(e+1)+'</span>'}},lazy:{loadPrevNext:!0,loadOnTransitionStart:!0,checkInView:!0},breakpoints:breakpoints,on:{init:function(){if(this.slides.length>this.params.slidesPerView){counter=this.$wrapperEl.parents('.tx-cs2-news').find('.fraction');currentCount='<span class="current">1</span>/<span class="count">'+e(this.$el).data('count')+'<span/>';counter.html(currentCount);this.$wrapperEl.parents('.tx-cs2-news').find('.swiper-controls').removeClass('d-none')};e('#'+e(i).next()[0].id+' .swiper-pagination-bullet-active').addClass('swiper-pagination-bullet-first').removeClass('swiper-pagination-bullet-active')},afterInit:function(){setTimeout(function(){e('#'+e(i).next()[0].id+' .swiper-pagination-bullet-first').removeClass('swiper-pagination-bullet-first').addClass('swiper-pagination-bullet-active')},100)},transitionStart:function(){if(this.slides.length>this.params.slidesPerView){counter=this.$wrapperEl.parents('.tx-cs2-news').find('.current');counter.text(this.activeIndex+1);if(this.slides.eq(this.previousIndex).length&&typeof this.slides.eq(this.previousIndex)[0].vliteplayer==='object'){this.slides.eq(this.previousIndex)[0].vliteplayer.player.pause()}}},reachEnd:function(){var t=this,i=e(t.$el).data('page'),n=e(t.$el).data('pages');if(i<n){t.autoplay.stop();e.ajax({url:e(t.$el).data('ajaxurl')+'&tx_cs2news_slider[page]='+(i+1),type:'POST',cache:!1,async:!0,success:function(i){t.appendSlide(e(i).find('.swiper-slide'))}}).done(function(){e(t.$el).data('page',i+1).attr('data-page',i+1);t.autoplay.start()})}}}});dur=e(i).data('duration')+'ms';dur1=e(i).data('duration')*0.375+'ms';del1=e(i).data('duration')*0.25+'ms';del2=e(i).data('duration')*0.5+'ms';del3=e(i).data('duration')*0.875+'ms';document.styleSheets[0].addRule('#'+e(i).next()[0].id+' .swiper-pagination-bullet-active .innner-circle','transition: border-top-color '+dur1+' linear, border-right-color '+dur1+' linear '+del1+', border-bottom-color '+dur1+' linear '+del2);document.styleSheets[0].addRule('#'+e(i).next()[0].id+' .swiper-pagination-bullet-active .outer-circle','transition: transform '+dur+' linear 0s, border-left-width 0s linear '+del3+';')};initNewsAudio=function(t){myparent=e(t).parents('.news-item');player=new i('#'+t.id,{options:{controls:!0,autoplay:!1,playPause:!0,progressBar:!0,time:!0,volume:!1},onPlay:function(){e(this.elements.controlBar).find('.v-duration').appendTo('.v-time.audio')}});t.currentTime=0;if(myparent.length){myparent[0].vliteplayer=player};setTimeout(function(){e(player.player.elements.controlBar).find('.v-duration').appendTo('.v-time.audio');player.player.play()},100)};e(document).on('click','.news-item.ntype-2',function(t){var n=e(t.currentTarget).find('.newspodcast')[0],i=e('.news-item.playing').not(e(t.currentTarget));if(i.length){i.removeClass('playing');i[0].vliteplayer.player.pause()};e(t.currentTarget).addClass('playing');if(typeof t.currentTarget.vliteplayer!=='object'){initNewsAudio(n)}
2else if(!e(t.target).parents('.v-controlBar').length){setTimeout(function(){t.currentTarget.vliteplayer.player.play()},250)}});e(document).on('click','.news-item',function(t){if(e(this).data('backlink')&&(e(this).hasClass('ntype-0')||e(this).hasClass('ntype-1')||e(this).hasClass('ntype-3'))){var i=new Date();i.setTime(i.getTime()+30000);document.cookie='newsbacklink='+e(this).data('backlink')+';expires='+i.toGMTString()+';path=/'}});e(document).on('click','.news-item .v-bigPlay',function(t){e(t.target).removeClass('show')});
2e(document).on('lazybeforeunveil.newsslider','.news-slider',function(e){initNewsSlider(e.target)})})

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.