1// ãã¡ã¤ã«ãã¹ 2let headerFilePath = "/include/_header.html"; 3let headerFilePath2 = "/include/_header2.html"; 4let footerFilePath = "/include/_footer.html"; 5let footerFilePath2 = "/include/_footer2.html"; 6let error404FilePath = "error/404.html"; 7let bannerFilePath = "/xml/banner.xml" 8let bannerFilePath2 = "/xml/banner.xml" 9 10// å ¨ç»é¢å ±éjsãã¼ãå¦ç 11$(function() { 12 // ãããã¨ããã¿ã¼ã®èªã¿è¾¼ã¿ 13 if (is_file(headerFilePath)) { 14 $("#header").load(headerFilePath, function(response, status, xhr) { 15 getXmlSystemSp(); 16 init_nav_ctl(); 17 }); 18 19 } else { 20 // localç°å¢ç¨ æ¬çªç°å¢ã§ã¯éããªã 1é層æ½ã£ã¦ãHTMLãã¡ã¤ã«ã®å ´ååç § 21 $("#header").load("../" + headerFilePath2, function(response, status, xhr) { 22 getXmlSystemSp(); 23 init_nav_ctl(); 24 }); 25 26 } 27 if (is_file(footerFilePath)) { 28 $("#footer").load(footerFilePath, function(response, status, xhr) { 29 getXmlBanner(bannerFilePath); 30 }); 31 } else { 32 // localç°å¢ç¨ æ¬çªç°å¢ã§ã¯éããªã 1é層æ½ã£ã¦ãHTMLãã¡ã¤ã«ã®å ´ååç § 33 $("#footer").load("../" + footerFilePath2, function(response, status, xhr) { 34 getXmlBanner(bannerFilePath2); 35 }); 36 } 37}); 38 39// 404ãã¼ã¸ã¸ãªãã¤ã¬ã¯ããã 40function redirect404() { 41 // 404ãã¼ã¸ã¸ãªãã¤ã¬ã¯ã 42 43 if (is_file(error404FilePath)) { 44 location.href=error404FilePath; 45 } else { 46 // localç°å¢ç¨ æ¬çªç°å¢ã§ã¯éããªã 1é層æ½ã£ã¦ãHTMLãã¡ã¤ã«ã®å ´ååç § 47 location.href="../" + error404FilePath; 48 } 49} 50 51// ãã¡ã¤ã«åå¨ãã§ã㯠52function is_file(fp){ 53 var flg=null; 54 $.ajax({ 55 url: fp, 56 cache: false, 57 async: false 58 }).done(function(data) { 59 flg=true; 60 }) 61 .fail(function(jqXHR, textStatus, errorThrown) { 62 flg=false; 63 }); 64 return flg; 65}
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.