PageSourceSearch

https://argokalymnos.gr/modules/mod_news_pro_gk4/interface/scripts/engine.portal.mode.1.js

js argokalymnos.gr collected 2026-10-02 14:18:43 UTC 2,395 bytes, 83 lines download raw bytes

1window.addEvent("load", function(){	
2    $$('.nspMainPortalMode1').each(function(module){
3		var id = module.getProperty('id');
4		var $G = $Gavick[id];
5		var current_art = 0;
6		var arts = module.getElements('.nspArt');
7		var arts_pos = [];
8		var auto_anim = module.hasClass('autoanim');
9		var anim_speed = $G['animation_speed'];
10		var anim_interval = $G['animation_interval'];
11		var animation = false;
12		var scrollWrap = module.getElement('.nspArts');
13		var scroller = new Fx.Scroll(scrollWrap, {duration: anim_speed, wheelStops: false});
14		var dimensions = scrollWrap.getSize();
15		var startItem = 0;
16		var sizeWrap = scrollWrap.getCoordinates();
17		// reset
18		scroller.set(0,0);
19		//
20		if(arts.length > 0 &&  scrollWrap.getScrollSize().y >  scrollWrap.getSize().y){
21			// find first unvisible news
22			var found = false;
23			//
24			for(var i = 0; i < arts.length && !found; i++) {
25				var size = arts[i].getCoordinates();
26				if((size.top - sizeWrap.top) + size.height - 10 > dimensions.y) {
27					found = i;
28				}	
29			}
30			//
31			start_item = found;
32		}
33		
34		arts.each(function(art,i) {
35			arts_pos[i] = {
36				top: art.getCoordinates().top, 
37				height: art.getCoordinates().height
38			};
39		});
40		if(module.getElement('.nspTopInterface .nspPrev')) {
41			module.getElement('.nspTopInterface .nspPrev').addEvent('click', function() {
42				animation = true;
43				if(current_art == 0) {
44					current_art = arts.length - 1;
45				} else {
46					current_art--;
47				}
48				if(current_art > 0) {
49					var to = arts_pos[current_art];
50					scroller.start(0, Math.abs(sizeWrap.height - ((to.top - sizeWrap.top) + to.height)));
51				} else {
52					scroller.start(0,scrollWrap.getScrollSize().y);
53				}
54			});
55
56			module.getElement('.nspTopInterface .nspNext').addEvent('click', function() {
57				animation = true;
58				if(current_art == 0) {
59					current_art = start_item;
60				} else {
61					if(current_art < arts.length - 1) {
62						current_art++;
63					} else {
64						current_art = 0;
65					}
66				}
67								
68				if(current_art > 0) {
69					var to = arts_pos[current_art];
70					scroller.start(0, Math.abs(sizeWrap.height - ((to.top - sizeWrap.top) + to.height)));
71				} else {
72					scroller.start(0,0);
73				}
74			});
75		}
76		if(auto_anim){
77			(function(){
78				if(!animation) module.getElement('.nspTopInterface .nspNext').fireEvent("click");
79				else animation = false;
80			}).periodical($G['animation_interval'] / 2);
81		}
82	});
83});

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.