PageSourceSearch

https://www.cofidis.be/nl/js/change_url.js?20250526

js cofidis.be collected 2026-09-24 12:37:31 UTC 2,831 bytes, 99 lines download raw bytes

1	
2function changeUrl(langue)
3{
4	// ========================================================== //
5	// Méthode permettant de passer au site NL tout en conservant //
6	// l'endroit du site où le client a cliqué                    //
7	// ========================================================== //
8	
9	// Récupération du protocole (ex: https)
10	var protocol = window.location.protocol;
11
12	// Récupération du seveur (ex: www.cofidis.be)
13	var hostname = window.location.hostname;
14
15	// Récupération du chemin (ex: /fr/home.php)
16	var chemin = window.location.pathname;
17
18	// Récupération des paramètres (ex: ?token=test&apn=DASIMCVD5)
19	var parametres = window.location.search;
20	
21	// Variable du chemin équivalent)
22	var nouveauChemin = "";
23	
24	// Variable determinant si la correspondance a été trouvée
25	var correspondance_trouvee = false;
26	
27	// Traitement
28	for (var key in changeUrlJSON)
29	{	if (langue == "FR")
30		{	if (changeUrlJSON[key].nl == chemin)
31			{	nouveauChemin = changeUrlJSON[key].fr;
32				correspondance_trouvee = true;
33			}
34		}
35		else if (langue == "NL")
36		{	if (changeUrlJSON[key].fr == chemin)
37			{	nouveauChemin = changeUrlJSON[key].nl;
38				correspondance_trouvee = true;
39			}
40		}
41	}
42
43	// Affectation de la HomePage si aucune valeur n'a été trouvée
44	if (correspondance_trouvee == false)
45	{	if (langue == "FR")
46		{	if (chemin.indexOf("/client/") > 0)
47			{	nouveauChemin = "/fr/identification/authentification.html";
48			}
49			else
50			{	nouveauChemin = "/fr/index.html";	
51			}
52		}
53		else if (langue == "NL")
54		{	if (chemin.indexOf("/client/") > 0)
55			{	nouveauChemin = "/nl/identification/authentification.html";
56			}
57			else
58			{	nouveauChemin = "/nl/index.html";
59			}
60		}
61	}
62	
63	// Variable contenant le nouveau chemin
64	var redirectionVers = protocol + "//" + hostname + nouveauChemin;
65
66	// Redirection
67	window.location.href = redirectionVers;
68
69	return true;
70		
71}
72
73
74function recup_url_jobs(langue)
75{
76	// ============================================================== //
77	// Méthode permettant de récupérer la bonne URL pour la page JOBS //
78	// et d'affecter cette URL au "href" de la class "href_jobs"      //
79	// ============================================================== //
80
81	var url_jobs = "";
82	
83	if (window.location.hostname == 'tst-www.cofidis.be')
84	{	url_jobs = "https://tst-jobs.cofidis.be/"+langue+"/Offres.aspx?action=tout";
85	}
86	else if (window.location.hostname == 'rqt-www.cofidis.be')
87	{	url_jobs = "https://rqt-jobs.cofidis.be/"+langue+"/Offres.aspx?action=tout";
88	}
89	else
90	{	url_jobs = "https://jobs.cofidis.be/"+langue+"/Offres.aspx?action=tout";
91	}
92
93	let href_jobs = document.getElementsByClassName("href_jobs");
94	for(let elem of href_jobs)
95	{	elem.setAttribute("href", url_jobs);
96	}
97	
98}
99	

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.