//このファイル自身のパス
var thisJsFilePath = (function() {
if (document.currentScript) {
return document.currentScript.src;
}
else {
var scripts = document.getElementsByTagName('script'),
script = scripts[scripts.length-1];
if (script.src)
return script.src;
}
})();
var thisFilePath = location.href;
//このファイルの親フォルダパス
curJsFolder = thisJsFilePath.substring(0, thisJsFilePath.lastIndexOf('/'));
curFolder = thisFilePath.substring(0, thisFilePath.lastIndexOf('/')) + '/';
document.write('\
\
\
\
\
\
');
document.write('\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
');
bodyTemp = '\
\
\
\
\
\
\
\
';
document.addEventListener("DOMContentLoaded", function () {
if ( document.domain != "localhost" && document.domain != "" ){
$.get("/_include/ga.html").done(function(data){
$('head').append(data);
})
}
bodyStr = $('body').html();
if (typeof title !== 'undefined' && $('h1').length >= 1){
document.title += $('h1').eq( $('h1').length - 1 ).text() + " | " + title;
}
$('body').html(bodyTemp);
if (typeof title !== 'undefined'){
$('#title').text(title);
}
if (typeof pankuzu !== 'undefined'){
$('#pankuzu').html(pankuzu);
}
if (typeof isNoneJs !== 'undefined' && isNoneJs == true){
$('#bodyContent').html(bodyStr);
$('body').css('visibility','visible');
return;
}
var bodyStr2 = makeHtml(bodyStr);
marked.setOptions({
"baseUrl": null,
"breaks": true,
"gfm": true,
"headerIds": true,
"headerPrefix": "",
"highlight": null,
"langPrefix": "language-",
"mangle": true,
"pedantic": false,
"sanitize": false,
"sanitizer": null,
"silent": false,
"smartLists": false,
"smartypants": false,
"xhtml": false
});
bodyStr2 = marked(bodyStr2);
$('#bodyContent').html(bodyStr2);
if ( document.title == "" ){
document.title += " | " + title;
}
$('body').css('visibility','visible');
//コード表示
if ($("pre").length > 0){
$("pre").each(function(){
$(this).addClass("linenums");
$(this).addClass("prettyprint");
});
PR.prettyPrint();
}
//外部リンクは新しいタブで開く
$("a[href^='http']:not([href*='" + location.hostname + "'])").attr('target', '_blank');
});