PageSourceSearch

https://cdn.sporx.com/_js/manset_tepe_tabli.js

js sporx.com collected 2026-09-24 20:17:34 UTC 3,973 bytes, 125 lines download raw bytes

1var AktifTepeManset = 1;
2var tepemansetTimerId = 0;
3var tepemansetTimerId2 = 0;
4
5function tepemanset_degistir(pos, tabid) {
6	if (pos == '+') {
7		AktifTepeManset += 1;
8		if (AktifTepeManset > 5)
9			AktifTepeManset = 1;
10	} else if (pos == '-') {
11		AktifTepeManset -= 1;
12		if (AktifTepeManset < 1)
13			AktifTepeManset = 5;
14	} else if (pos > 0 && pos <= 5) {
15		AktifTepeManset = pos;
16	}
17
18	var i = 0;
19
20	$mansetDiv = $('.tm-tab' + tabid);
21	console.log(tabid);
22	for ( k = 1; k <= 5; k++) {
23		i = (k - 1);
24
25		if (k == AktifTepeManset) {
26			$mansetDiv.children('.tm-content').children().eq(i).addClass('active').removeClass('none');
27			$mansetDiv.children('.tm-nav').children().eq(i).addClass('active');
28
29		} else {
30			$mansetDiv.children('.tm-content').children().eq(i).removeClass('active').addClass('none');
31			$mansetDiv.children('.tm-nav').children().eq(i).removeClass('active');
32
33		}
34	}
35
36	clearTimeout(tepemansetTimerId);
37	tepemansetTimerId = setTimeout("tepemanset_degistir('+','1')", 5000);
38	clearTimeout(tepemansetTimerId2);
39	tepemansetTimerId2 = setTimeout("tepemanset_degistir('+','2')", 5000);
40}
41
42function mnstop() {
43	clearTimeout(tepemansetTimerId);
44	clearTimeout(tepemansetTimerId2);
45}
46
47function mnstart() {
48	tepemansetTimerId = setTimeout("tepemanset_degistir('+','1')", 5000);
49	tepemansetTimerId2 = setTimeout("tepemanset_degistir('+','2')", 5000);
50}
51
52tepemansetTimerId = setTimeout("tepemanset_degistir('+','1')", 5000);
53tepemansetTimerId2 = setTimeout("tepemanset_degistir('+','2')", 5000);
54
55$('#tepeManset .tm-nav').children().hover(function() {
56	var sira = $(this).index() + 1;
57	console.log($(this).parent().parent().attr('data-tabid'));
58	tepemanset_degistir(sira, $(this).parent().parent().attr('data-tabid'));
59	mnstop();
60}, function() {
61	mnstart();
62});
63
64document.addEventListener("DOMContentLoaded", function() {
65	function toSlug(str) {
66		// Önce küçük harfe çevir
67		str = str.toLowerCase();
68
69		// Türkçe karakter eþlemeleri
70		const charMap = {
71			'ð': 'g', 'ü': 'u', 'þ': 's', 'ý': 'i', 'ö': 'o', 'ç': 'c',
72			'ð': 'g', 'ü': 'u', 'þ': 's', 'ý': 'i', 'ö': 'o', 'ç': 'c'
73		};
74
75		// Türkçe karakterleri Ýngilizce muadilleriyle deðiþtir
76		str = str.replace(/[ðüþiöç]/g, function(char) {
77			return charMap[char] || char;
78		});
79
80		// Týrnak, noktalama vs. gibi iþaretleri temizle
81		str = str.replace(/[^\w\s-]/g, '');
82
83		// Fazla boþluklarý tek boþluða indir
84		str = str.trim().replace(/\s+/g, '-');
85
86		return str;
87	}
88
89	document.addEventListener("DOMContentLoaded", function() {
90		// .tm bloklarýný gez
91		document.querySelectorAll('.tm').forEach(function(tmElement) {
92			// Ýçindeki anchor (a.tm-b) seç
93			const link = tmElement.querySelector('a.tm-b');
94			if (link) {
95				const href = link.getAttribute('href') || '';
96				// Kontrol: "eksik" kýsým var mý? (örnek: https://www.sporx.com/-SXHBQ...)
97				if (href.startsWith('https://www.sporx.com/-SXHBQ')) {
98					// Ýlgili bloðun <p> etiketindeki metni al
99					const pElement = tmElement.querySelector('.tm-body p');
100					if (pElement) {
101						// Ýlk 5 kelimeyi al
102						const pText = pElement.textContent.trim();
103						// Noktalama vs. ayýklamak için bölmeden önce istersek ufak temizlik yapýlabilir
104						const words = pText.split(/\s+/).slice(0, 5).join(' ');
105
106						// Oluþturulacak slug
107						const slug = toSlug(words); // örn: "besiktas-ta-ortaya-koydugu-performansla"
108
109						// Orijinal href parçasýný ayýr
110						// -> "https://www.sporx.com/-SXHBQ1108600SXQ" içinden "-SXHBQ1108600SXQ" kýsmýný al
111						const suffix = href.split('https://www.sporx.com/')[1]; // "-SXHBQ1108600SXQ"
112
113						// Yeni href üret
114						// -> "https://www.sporx.com/" + "besiktas-ta-ortaya-koydugu-performansla" + "-SXHBQ1108600SXQ"
115						const newHref = 'https://www.sporx.com/' + slug + suffix;
116
117						// Linkin href'ini güncelle
118						link.setAttribute('href', newHref);
119					}
120				}
121			}
122		});
123	});
124});
125

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.