PageSourceSearch

https://sakura-taisen-theanimation.com/js/jquery.comment.js

js sakura-taisen-theanimation.com collected 2026-10-02 17:31:17 UTC 2,504 bytes, 66 lines download raw bytes

1function getParam(name, url) {
2	if (!url) url = window.location.href;
3	name = name.replace(/[\[\]]/g, "\\$&");
4	var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
5		results = regex.exec(url);
6	if (!results) return null;
7	if (!results[2]) return '';
8	return decodeURIComponent(results[2].replace(/\+/g, " "));
9}
10$(function(){
11	//1ページに表示する
12	var pn = 10;
13	//ページナビに表示する数
14	var ln = 5;
15	
16	var pid = getParam('page');
17	if(!pid){
18		pid = 1;
19	}
20	var ls = (pid - 1) * pn;
21	var ll = ls + pn - 1;
22	$.ajax({
23		url:'comment.xml',
24		type:'GET',
25		dataType:'xml',
26		timeout:5000,
27		error:function() {
28			console.log("ニュースの読み込みに失敗");
29		},
30		success:function(xml){
31			var la = $(xml).find("item").length;
32			$(xml).find("item").each(function(i,e) {
33				if(i >= ls){
34					var dAnchor = ($(this).find('anchor').text() == '1') ? '#i_' : '';
35					var dLink = ($(this).find('directlink').text() == '1') ? '../'+dAnchor+$(this).find('permalink').text() : './'+$(this).find('permalink').text();
36					var newsCategory01 =  (!$(this).find('newsCategory01').text() == '') ? '<li class="newsCategory">'+$(this).find('newsCategory01').text()+'</li>' : '';
37					var newsCategory02 =  (!$(this).find('newsCategory02').text() == '') ? '<li class="newsCategory">'+$(this).find('newsCategory02').text()+'</li>' : '';
38					var newsCategory03 =  (!$(this).find('newsCategory03').text() == '') ? '<li class="newsCategory">'+$(this).find('newsCategory03').text()+'</li>' : '';
39					var isUpdate =  (!$(this).find('isUpdate').text() == '') ? '<li class="isUpdate">'+$(this).find('isUpdate').text()+'</li>' : '';
40
41					$("#news_list ul").append('<li><a href="'+dLink+'"><div class="n_subinfo"><p class="newsTime jo">'+$(this).find('date').text()+'</p><ol class="newsTags">'+newsCategory01+newsCategory02+newsCategory03+isUpdate+'</ol></div><p class="newsTitle">'+$(this).find('title').text()+'</p></a></li>');
42
43
44				}
45				if(i === ll){return false;}
46			});
47			var lp = Math.ceil(la/pn);
48			if(ln > lp){
49				ln = lp;
50			}
51			var est = pid - (Math.ceil(ln/2))+1;
52			if(Math.ceil(ln/2) >= pid){
53				est = 1;
54			}else if(pid > lp - (Math.ceil(ln/2))){
55				est = lp - ln + 1;
56			}
57			for(i = est;i < est+ln;i++){
58				if(i == pid){
59					$('.pagingBox').append('<span>'+i+'</span>');
60				}else{
61					$('.pagingBox').append('<a href="'+location.pathname+'?page='+i+'" class="aml">'+i+'</a>');
62				}
63			}
64		}
65	});
66});

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.