$.fn.isVisible = function() {
	return $.expr.filters.visible(this[0]);
};

function showContents(targetUrl, methodType = 'GET') {
	if(methodType == 'GET') {
		dispLoading();
		$.ajax({
			url: targetUrl,
			type: 'GET',
			dataType: 'html',
		})
		.done(function(data) {
			$('main').html($(data).html());
		})
		.fail(function(data) {
			//失敗時
		})
		.always(function(data) {
			removeLoading();
		});
	}else{
		console.log("not implement.");
	}
}

function dispLoading(message) {
	var loadingMessage = message != '' ? '<div id="loading-text">' + message + '</div>' : '';
	if($('#loading').size() == 0) {
		$('main').insertBefore('<div id="loading">' + loadingMessage + '</div>');
		$('#loading').hide();
		$('#loading').fadeIn(500);
	}
}

function removeLoading() {
	$('#loading').fadeOut(
		500,
		function() {
			$('#loading').remove();
		});
}

$(function() {
	$('#contents > nav > ul > li > ul').hide();

	$('#contents nav ul li h1').click(function () {
		if($(this).parent().children('ul').isVisible() == true) {
			$(this).parent().children('ul').hide(250);
		} else {
			$(this).parent().children('ul').show(250);
		}
	});

	$('#myapp ul li').click(function () {
		if($(this).children().prop('nodeType') != 1) {
			var idName = $(this).attr('id');
			if(idName == 'myapp-new') {
				showContents('https://misskey.xyz/dev/myapp-new');
			} else {
				showContents('https://misskey.xyz/dev/myapp?q=' + idName);
			}
		}
	});

	$('#restapi ul li , #streamingapi ul li').click(function () {
		if($(this).children().prop("nodeType") != 1) {
			var idName = $(this).attr("id");
			showContents('https://misskey.xyz/dev/reference?q=' + idName);
		}
	});

	$('#usertheme ul li').click(function () {
		if($(this).children().prop("nodeType") != 1) {
			var idName = $(this).attr("id");
			if(idName == "usertheme-new") {
				showContents('https://misskey.xyz/dev/usertheme-new');
			} else {
				showContents('https://misskey.xyz/dev/usertheme?q=' + idName);
			}
		}
	});
});
@@ -115,16 +115,8 @@
 Type
- = 'GET'
 ) %7B%0A
@@ -1321,24 +1321,31 @@
 v/myapp-new'
+, 'GET'
 );%0A%09%09%09%7D else
@@ -1399,32 +1399,39 @@
 app?q=' + idName
+, 'GET'
 );%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D);
@@ -1639,24 +1639,31 @@
 q=' + idName
+, 'GET'
 );%0A%09%09%7D%0A%09%7D);%0A
@@ -1882,16 +1882,23 @@
 eme-new'
+, 'GET'
 );%0A%09%09%09%7D 
@@ -1968,16 +1968,23 @@
 + idName
+, 'GET'
 );%0A%09%09%09%7D%0A

Fix typo