PageSourceSearch

https://stellenmarkt.wuv.de/api/js/jwtpljslib.ptc-0.1.js?cb=b68592391ca08696051551e9002c536d

js wuv.de collected 2026-09-24 15:17:13 UTC 14,216 bytes, 426 lines download raw bytes

1'use strict';
2var JwTplJsLibPtc = (function(){
3	let
4		_api = false,
5		ptc = {
6			'pageType': '',
7			'page': {
8				'url':'',
9				'title':'',
10				'jobId':'',
11				'jobJmId': '',
12				'adv': '',
13				'advLink':'',
14				'date': '',
15				'loc': '',
16				'md': 0,
17				'liq': false,
18				'addons': [],
19				'cat': new Map(),
20				'catId':[],
21				'appSpuch': '',
22				'jsjn': '',
23				'jsjo': '',
24				'jsjr': 0,
25				'cnt':0,
26				'sort':'',
27				'jt':'',
28				'logo': '',
29				'segJob':'',
30				'seg':''
31			},
32			'classList': []
33		};
34
35	const 
36		hp = 'jwtpl-sys-bodyPtHp', 
37		pnf = 'jwtpl-sys-bodyPt404',
38		seo = 'jwtpl-sys-bodyPtSeo', 
39		result = 'jwtpl-sys-bodyPtResult', 
40		view = 'jwtpl-sys-bodyPtViewer',
41		detailView = 'jwtpl-sys-bodyPtDetailviewer',
42		advertiser = 'jwtpl-sys-bodyPtAdvertiser',
43		advList = 'jwtpl-sys-bodyPtAdvlist',
44		content = 'jwtpl-sys-bodyPtContent',
45		isJw0 = 'jwtpl-jobad-blockIsJw0',
46		isReJw0 = 'jwtpl-jobad-blockIsReJw0',
47		isOwn0 = 'jwtpl-jobad-blockIsMo0',
48		isJw1 = 'jwtpl-jobad-blockIsJw1',
49		isReJw1 = 'jwtpl-jobad-blockIsReJw1',
50		isOwn1 = 'jwtpl-jobad-blockIsMo1',
51		isLiq1 = 'jwtpl-jobad-blockIsLiquid1', 
52		addon = 'jwtpl-sysHili-addon',
53		spuch = 'jwtpl-sys-bodyAppSpuch',
54		jobJmIdRegex = /\/job[\/detail]*?\/[a-z0-9A-Z-_]+\.([0-9]+)\./i; 
55		
56	if (typeof JwTplJsLib == "object") {
57		_api = JwTplJsLib;
58	}
59	
60	if(_api !== false) {
61		return {
62			getPageType: function(){
63				for(let i=0; i<ptc['classList'].length; i++) {
64					if(ptc['classList'][i] === hp){return 'hp';}
65					if(ptc['classList'][i] === pnf){return 'pnf';}
66					if(ptc['classList'][i] === seo){return 'seo';}
67					if(ptc['classList'][i] === result){return 'result';}
68					if(ptc['classList'][i] === view){return 'view';}
69					if(ptc['classList'][i] === detailView){return 'detailView';}
70					if(ptc['classList'][i] === advertiser){return 'advertiser';}
71					if(ptc['classList'][i] === advList){return 'advList';}
72					if(ptc['classList'][i] === content){return 'content';}
73				}
74				return '';
75			},						
76			isPageHp: function(){
77				return this.getPageType() === 'hp';
78			},
79			isPage404: function(){
80				return this.getPageType() === 'pnf';
81			},
82			isPageSeo: function(){
83				return this.getPageType() === 'seo';
84			},
85			isPageResult: function(){
86				return this.getPageType() === 'result';
87			},
88			isPageView: function(){
89				return this.getPageType() === 'view';
90			},
91			isPageDetailView: function(){
92				return this.getPageType() === 'detailView';
93			},
94			isPageAdvertiser: function(){
95				return this.getPageType() === 'advertiser';
96			},
97			isPageAdvList: function(){
98				return this.getPageType() === 'advList';
99			},
100			isPageContent: function(){
101				return this.getPageType() === 'content';
102			},
103			isPageHpLike: function(){
104				return this.isPageHp() || this.isPage404();
105			},
106			isPageViewLike: function(){
107				return this.isPageView() || this.isPageDetailView();
108			},
109			isPageResultLike: function(){
110				return this.isPageSeo() || this.isPageResult() || this.isPageAdvertiser();
111			},
112			isMobile: function(){
113				return _api.isMobile();
114			},
115			isPortrait: function(){
116				return _api.isPortrait();
117			},
118			isLandscape: function(){
119				return _api.isLandscape();	
120			},
121			getPageUrl: function(){
122				return ptc['page']['url'];
123			},
124			getPageTitle: function(){
125				return ptc['page']['title'];
126			},
127			getPageJobId: function(){
128				return ptc['page']['jobId'];
129			},
130			getPageJobJmId: function(){
131				return ptc['page']['jobJmId'];
132			},
133			getPageAdv: function(){
134				return ptc['page']['adv'];
135			},
136			getPageAdvLink: function(){
137				return ptc['page']['advLink'];
138			},
139			getPageDate: function(){
140				return ptc['page']['date'];
141			},
142			getPageLoc: function(){
143				return ptc['page']['loc'];
144			},
145			getMd: function() {
146				return ptc['page']['md'];	
147			},
148			getLiq: function() {
149				return ptc['page']['liq'];
150			},
151			getAddons: function(asString = false) {
152				if(asString === true) {
153					return ptc['page']['addons'].join(',');
154				} else {
155					return ptc['page']['addons'];	
156				}
157			},
158			getCat: function() {
159				return ptc['page']['cat'];
160			},
161			getAppSpuch: function() {
162				return ptc['page']['appSpuch'];
163			},
164			getJsJn: function() {
165				return ptc['page']['jsjn'];
166			},
167			getJsJo: function() {
168				return ptc['page']['jsjo'];
169			},
170			getJsJr: function() {
171				return ptc['page']['jsjr'];
172			},
173			getCatId: function() {
174				return ptc['page']['catId'];
175			},
176			getCnt: function() {
177				return ptc['page']['cnt'];
178			},
179			getSort: function() {
180				return ptc['page']['sort'];
181			},
182			getJt: function() {
183				return ptc['page']['jt'];
184			},
185			getLogo: function() {
186				return ptc['page']['logo'];
187			},
188			getSegJob: function() {
189				return ptc['page']['segJob'];
190			},
191			getSeg: function() {
192				return ptc['page']['seg'];
193			},
194			
195			initPtc: function(){
196				let 
197					body = _api.get('body'),
198					jobad = _api.get('.jwtpl-jobad-block'),
199					date = _api.get('.jwtpl-jobaded-dataMainDateRaw'),
200					catArea = _api.get('.jwtpl-jobaded-dataCatItemName, .jwtpl-jobaded-dataCatItemNameLocation'),	
201					segJob = _api.get('.jwtpl-jobad-adIframe'),				
202					seg = _api.getUrlParameter('jw_chl_seg');
203										
204				ptc['page']['url'] = location.href;				
205				if(body.length > 0) {
206					ptc['classList'] = body[0].classList;
207				}
208				if(jobad.length > 0) {
209					let 
210						title = _api.get('.jwtpl-jobad-title'),
211						jobId = _api.get('[data-jwtpl-jobad-br]'),
212						adv = _api.get('.jwtpl-jobad-company'),
213						loc = _api.get('.jwtpl-jobad-location'),
214						addonArea = _api.get('.jwtpl-jobad-addonsAfterJobAd');
215					
216					if(title.length > 0) {
217						ptc['page']['title'] = title[0].textContent;
218					}
219					if(jobId.length > 0 && jobId[0].hasAttribute('data-jwtpl-jobad-br') === true) {
220						ptc['page']['jobId'] = jobId[0].getAttribute('data-jwtpl-jobad-br');
221					}
222					if(adv.length > 0) {
223						let child = adv[0].children; 
224						if(child.length == 1 && child[0].hasAttribute('href') === true && child[0].getAttribute('href').length > 0) {
225							ptc['page']['advLink'] = child[0].getAttribute('href');
226						}
227						ptc['page']['adv'] = adv[0].textContent;
228					}
229					if(loc.length > 0) {
230						ptc['page']['loc'] = loc[0].textContent;
231					}
232					if(addonArea.length > 0) {
233						_api.each(addonArea[0].classList, function(it){
234							if(it.indexOf(addon) !== -1 && it.length > addon.length) {
235								it = it.slice(addon.length, it.length);
236								ptc['page']['addons'].push(it);
237							}
238						});
239					}
240					if(_api.hasClass(jobad[0], isReJw1) === true && _api.hasClass(jobad[0], isOwn1) === true) {
241						ptc['page']['md'] = 1;
242					} else if(_api.hasClass(jobad[0], isReJw1) === true && _api.hasClass(jobad[0], isOwn0) === true) {
243						ptc['page']['md'] = 1;	
244					} else if(_api.hasClass(jobad[0], isReJw0) === true && _api.hasClass(jobad[0], isOwn1) === true) {
245						ptc['page']['md'] = 2;	
246					} else if(_api.hasClass(jobad[0], isReJw0) === true && _api.hasClass(jobad[0], isOwn0) === true) {
247						if(_api.hasClass(jobad[0], isJw1) === true) {
248							ptc['page']['md'] = 3;
249						} else {
250							ptc['page']['md'] = 4;	
251						}
252					}
253					if(_api.hasClass(jobad[0], isLiq1) === true) {
254						ptc['page']['liq'] = true;
255					}
256				}
257				if(date.length > 0) {
258					ptc['page']['date'] = date[0].textContent;
259				}
260				if(catArea.length > 0) {
261					_api.each(catArea, function(it){
262						if(_api.type(it.nextElementSibling) !== undefined && _api.type(it.nextElementSibling.children) !== undefined) {
263							let catItems = [];
264							_api.each(it.nextElementSibling.children, function(it){
265								let itemData = [];
266								itemData.push(it.innerText);
267								if(_api.type(it.href) !== undefined && _api.isStringNotEmpty(it.href) === true){
268									itemData.push(it.href);	
269									if(it.href.indexOf('?') !== -1) {
270										let queryString = it.href.substring(it.href.indexOf('?') + 1);
271										itemData.push(queryString);
272									}
273								}
274								catItems.push(itemData);
275							});
276							ptc['page']['cat'].set(it.innerText, catItems);
277						}
278					});
279				}
280				if(this.isPageView() === true || this.isPageDetailView() === true) {
281					let res = document.location.href.match(jobJmIdRegex);
282					if(_api.type(res) !== undefined && res.length == 2) {
283						ptc['page']['jobJmId'] = res[1];
284					}
285				}
286				_api.each(ptc['classList'], (it)=> {
287					if(it.indexOf(spuch) !== -1) {
288						it = it.split(spuch);
289						if(it.length == 2){
290							ptc['page']['appSpuch'] = it[1].toLowerCase();
291						}
292					}
293				});
294				if(this.isPageResultLike() === true) {
295					let 
296						jsjn = _api.get('.jwtpl-sebo-searchFormTextJsJn'),
297						jsjo = _api.get('.jwtpl-sebo-searchFormTextJsJo'),
298						cnt = _api.get('[data-jwtpl-hili-rowCnt]'),
299						catId = _api.get('[data-jwtpl-fite-allSetCatIds]'),
300						sort = _api.get('.jwtpl-fite-sortingElementActive'),
301						jt = _api.get('.jwtpl-sebo-jsJtElementActive1');
302						
303					if(jsjn.length > 0) {
304						if(jsjn[0].value !== '') {
305							ptc['page']['jsjn'] = jsjn[0].value;
306						}
307					}
308					if(jsjo.length > 0) {
309						if(jsjo[0].value !== '') {
310							let jsjr = _api.get('.jwtpl-sebo-formJsJrHidden');
311							if(jsjr.length > 0) {
312								if(jsjr[0].value !== '') {
313									let n = parseInt(jsjr[0].value);
314									ptc['page']['jsjr'] = _api.isInt(n) === true ? n : ptc['page']['jsjr'];
315								}
316							}
317							ptc['page']['jsjo'] = jsjo[0].value;
318						}
319					}
320					if(cnt.length > 0){
321						let c = parseInt(cnt[0].getAttribute('data-jwtpl-hili-rowCnt'));
322						ptc['page']['cnt'] = _api.isInt(c) === true ? c : ptc['page']['cnt'];
323					}
324					if(catId.length > 0){
325						ptc['page']['catId'] = catId[0].getAttribute('data-jwtpl-fite-allSetCatIds').split(',');
326					}
327					if(sort.length > 0){
328						ptc['page']['sort'] = sort[0].innerText.length > 0 ? sort[0].innerText : ptc['page']['sort'];
329					}
330					if(jt.length > 0){
331						ptc['page']['jt'] = jt[0].hasAttribute('data-jwtpl-sebo-jsJtText') === true && jt[0].getAttribute('data-jwtpl-sebo-jsJtText').length > 0 ? jt[0].getAttribute('data-jwtpl-sebo-jsJtText') : ptc['page']['jt'];
332					}
333				}
334				if(this.isPageViewLike() === true || this.isPageResultLike() === true) {
335					let onhi = _api.get('.jwtpl-onhi-col1 > img');
336					if(onhi.length > 0 && onhi[0].hasAttribute('src') && onhi[0].getAttribute('src').length > 0) {
337						ptc['page']['logo'] = onhi[0].getAttribute('src');
338					} else {
339						let 
340							jobadBlock = _api.get('.jwtpl-jobad-block'),
341							itemLink = _api.get('.jwtpl-hili-itemLink'),
342							img = _api.get('.jwtpl-hili-col1 > img');
343	
344						if(jobadBlock.length > 0 && itemLink.length > 0 && img.length > 0) {
345							if(jobadBlock[0].hasAttribute('data-jwtpl-jobad-url') === true && jobadBlock[0].getAttribute('data-jwtpl-jobad-url').length > 0) {
346								let url = jobadBlock[0].getAttribute('data-jwtpl-jobad-url').split('?');
347								if(url.length == 1 || url.length == 2) {
348									url = url[0];
349									for(let i=0; i<itemLink.length; i++) {
350										if(itemLink[i].hasAttribute('href') === true && itemLink[i].getAttribute('href').length > 0) {
351											if(itemLink[i].href === url) {
352												if(img[i].hasAttribute('data-jwtpl-sysImg-lazySrc') === true && img[i].getAttribute('data-jwtpl-sysImg-lazySrc').length > 0) {
353													ptc['page']['logo'] = img[i].getAttribute('data-jwtpl-sysImg-lazySrc');
354													break;
355												} 
356											}
357												
358										}
359									}
360								}
361							}
362						}						
363					}
364				}
365				if(segJob.length > 0){
366						ptc['page']['segJob'] = segJob[0].hasAttribute('data-src') === true && segJob[0].getAttribute('data-src').length > 0 ? segJob[0].getAttribute('data-src') : ptc['page']['segJob'];
367						let result = ptc['page']['segJob'];						
368						if( typeof ptc['page']['segJob'] !== undefined && ptc['page']['segJob'].length > 0){							
369		    				let	items = ptc['page']['segJob'].split("?");					
370		    				for(let i=0; i<items.length; i++){								
371		    					let pair = items[i].split("=");
372		    					if(pair[0] === 'jw_chl_seg'){									
373		    						result = pair[1];		    						
374		    					}
375		    					else{
376									result = '';	
377								}
378		    				}
379		    			}		    										
380						ptc['page']['segJob'] = result;											
381				}				
382				ptc['page']['seg'] = seg !== false ? seg : ptc['page']['seg'];
383			}
384		}
385
386	} else {
387		return {
388			initPtc: function(){},
389			getPageType: function() { return false; },
390			isPageHp: function() { return false; },
391			isPageSeo: function() { return false; },
392			isPageResult: function() { return false; },
393			isPageView: function() { return false; },
394			getPageUrl: function() { return false; },
395			getPageTitle: function() { return false; },
396			getPageJobId: function() { return false; },
397			getPageJobJmId: function() { return false; },
398			getPageAdv: function() { return false; },
399			getPageDate: function() { return false; },
400			isMobile: function() { return false; },
401			isPortrait: function() { return false; },
402			isLandscape: function() { return false; },
403			getPageUrl: function(){return false;},
404			getPageTitle: function(){return false;},
405			getPageJobId: function(){return false;},
406			getPageJobJmId: function(){return false;},
407			getPageAdv: function(){return false;},
408			getPageDate: function(){return false;},
409			getMd: function() {return false;},
410			getLiq: function() {return false;},
411			getAddons: function() {return false;},
412			getCat: function() {return false;},
413			getAppSpuch: function() {return false;},
414			getJsJn: function() {return false;},
415			getJsJo: function() {return false;},
416			getJsJr: function() {return false;},
417			getCatId: function() {return false;},
418			getCnt: function() {return false;},
419			getSort: function() {return false;},
420			getJt: function() {return false;},
421			getSeg: function() {return false;}
422		}
423	}
424})();
425
426

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.