PageSourceSearch

https://www.migvan.org.il/htm-webaxy/tv/js/tv_new2.js

js migvan.org.il collected 2026-10-02 23:00:11 UTC 4,229 bytes, 150 lines download raw bytes

1var tvTabButtons = new Array();
2var tvTabDivs = new Array();
3var properties = new Array();
4if (!srcs) {
5	var srcs = null;
6}
7//===================================================================
8//  
9//  startPage: run onload
10//  
11//===================================================================
12function startPage(queryString) {
13	setIframes('all'); 
14	setProperties(queryString);
15	var tvChannels = document.getElementById("tvChannels");
16	tvTabDivs = $('.admin-tab');	
17	tvTabButtons = $('.admin-button-channel');	
18	if (!properties['opentab']) {
19		properties['opentab'] = 0;
20	}
21	showChannel(properties['opentab']); 
22}	
23//===================================================================
24//  
25//  setProperties: analize search query line
26//  
27//===================================================================
28function setProperties(queryString) {
29	if (!queryString) {
30		queryString = decodeURIComponent(location.search.slice(1));
31	}
32	
33	if (queryString.indexOf("=") != -1) {
34		var pairs = queryString.split(/&/);
35		for (var p = 0;p < pairs.length; p++) {
36			if (pairs[p].search(/=/) != -1) {
37				key_value = pairs[p].split(/=/,2);
38				properties[key_value[0]] = key_value[1];
39			}
40		}
41	}
42}	
43//===================================================================
44//  
45//  setIframes: set iframes src
46//  
47//===================================================================
48function setIframes(idx) {
49	if (!srcs) {
50		return;
51	}
52	var all_iframes = document.getElementsByTagName("iframe");
53	var ifrs = new Array();
54	for (var i = 0; i < all_iframes.length; i++) {
55		if (all_iframes[i].name.search(/ifr\d+/) == 0) {
56			ifrs[ifrs.length] = all_iframes[i];
57		}
58	}
59	
60	if (idx != "all") {
61		if (srcs[idx]) {
62			var delim = (srcs[idx].search(/\?/)== -1) ? "?" : "&";
63			var rand = Math.floor(Math.random() * 1000000);
64			srcs[idx] = srcs[idx].replace(/[&\?]rand=[^\&]*/,"");
65			srcs[idx] += delim + "rand=" + rand;
66			ifrs[idx].src = srcs[idx];
67		}
68		return;
69	}
70	
71	for (var i = 0; i < ifrs.length; i++) {
72		if (srcs[i] && (ifrs[i].src != srcs[i])) {
73			ifrs[i].src = srcs[i];
74		}
75	}
76	
77	
78}	
79//===================================================================
80//  
81//  showChannel: switch between channels
82//  
83//===================================================================
84function showChannel(idx) {
85	var channelButton = tvTabButtons[idx];
86	var channelDiv = tvTabDivs[idx];
87	for (var b=0;b<tvTabButtons.length;b++) {
88		if (b == idx) {
89			if (channelButton.className == "buttonOn") {
90				setIframes(b);
91			}
92			onButton(b);
93			onChannel(b);
94		}
95		else {
96			outButton(b);
97			outChannel(b);
98		}
99	}
100}	
101//===================================================================
102//  
103//  onButton: button is on
104//  
105//===================================================================
106function onButton(idx) {
107	var counter = 0;
108	$('#button'+idx).addClass('admin-button-channel-on');
109	//$('#button'+idx).removeClass('admin-button-channel');
110}	
111//===================================================================
112//  
113//  outButton: button is on
114//  
115//===================================================================
116function outButton(idx) {
117	//$('#button'+idx).addClass('admin-button-channel');
118	$('#button'+idx).removeClass('admin-button-channel-on');
119}	
120//===================================================================
121//  
122//  onChannel: channel is on
123//  
124//===================================================================
125function onChannel(idx) {
126	$('#channel'+idx).css('display', 'block');
127	$('#channel'+idx).css('z-index', '0');
128}	
129//===================================================================
130//  
131//  outChannel: channel is out
132//  
133//===================================================================
134function outChannel(idx) {
135	$('#channel'+idx).css('display', 'none');
136	$('#channel'+idx).css('z-index', -1);
137}	
138//===================================================================
139//  
140//  firstTableChild: find the first child table in object
141//  
142//===================================================================
143function firstTableChild(obj) {
144	for (var c=0; c< obj.childNodes.length; c++) {
145		if (obj.childNodes[c].tagName == "TABLE") {
146			return obj.childNodes[c];
147		}
148	}
149	return null;
150}	

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.