PageSourceSearch

https://www.generalww.com/shared/js-0000-language-change-01.js

js generalww.com collected 2026-10-01 12:36:43 UTC 2,293 bytes, 60 lines download raw bytes

1// $(function(){ 
2// 	url = window.location.href;
3// 	//書換え対象の国コード
4// 	url2 = url.match(/(\/th\/){1}(\/tms_eu\/|de\/|fr\/|es\/|it\/|el\/|pt\/|bg\/|hr\/|cs\/|nl\/|hu\/|pl\/|ro\/|sk\/|sl\/|tr\/|en\/|th\/)?/);
5// 	//対象外URL
6// 	//url3 = url.match(/(\/company-name\/|\/application-form\/)/);
7// 	url3 = null;
8// 	if( url2 != null && url3 == null) {
9// 		//$('#language-area').show();
10// 		//$('#fujitsu-brand').css({'visibility':'visible'});
11// 		option = $('#language-list').children('li').children('a');
12// 		selectCount = option.length;
13// 		for ( var i = 0;  i < selectCount;  i++  ) {
14// 			lang = option[i].id;
15// 			optionId = '#' + option[i].id;
16// 			lang = '/'+lang+'/';
17// 			//langUrl = url.replace(url2[0], lang);
18// 			langUrl = lang;
19// 			//$(optionId).attr('href', langUrl);
20// 			var target = document.getElementById(option[i].id);
21// 			target.href = langUrl;
22// 		}
23// 	}
24// });
25
26
27$(function () {
28  url = window.location.href;
29  //書換え対象の国コード
30  url2 = url.match(/(\/th\/|\/be\/){1}(\/tms_eu\/|de\/|fr\/|es\/|it\/|el\/|pt\/|bg\/|hr\/|cs\/|nl\/|hu\/|pl\/|ro\/|sk\/|sl\/|tr\/|en\/|th\/)?/);
31  if (!/(\/th\/en\/|\/th\/th\/)/.test(url) && /\/th\//.test(url)) {
32    // th の時 th/th と同等とみなす (th/index.htmlだけth/thへのURLになってないため)
33    // th/th th/enは含まないがthを含む
34    url = url.replace("th", "th/th");
35  }
36  //対象外URL
37  //url3 = url.match(/(\/company-name\/|\/application-form\/)/);
38  url3 = null;
39  if (url2 != null && url3 == null) {
40    //$('#language-area').show();
41    //$('#fujitsu-brand').css({'visibility':'visible'});
42    option = $('#language-list').children('li').children('a');
43    selectCount = option.length;
44    for (var i = 0; i < selectCount; i++) {
45      lang = option[i].id;
46      optionId = '#' + option[i].id;
47      lang = '/' + lang + '/';
48      //langUrl = url.replace(url2[0], lang);
49      langUrl = lang;
50      //$(optionId).attr('href', langUrl);
51      var target = document.getElementById(option[i].id);
52      target.href = langUrl;
53      if (RegExp(lang).test(url)) {
54        //liをhiddenにする
55        //target.hidden = true;
56        target.parentElement.hidden = true;
57      }
58    }
59  }
60});

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.