PageSourceSearch

https://www.lawsonkenpo.or.jp/common/std/js/jquery.zrssfeed.min.js

js lawsonkenpo.or.jp collected 2026-10-05 01:06:58 UTC 3,742 bytes, 56 lines download raw bytes

1(function(l){l.fn.rssfeed=function(d,h,v){h=l.extend({limit:10,offset:1,header:!0,titletag:"h4",date:!0,dateformat:"date",content:!0,snippet:!0,media:!0,showerror:!0,errormsg:"",key:null,ssl:!1,linktarget:"_blank",linkredirect:"",linkcontent:!1,sort:"",sortasc:!0,historical:!1},h);
2
3return this.each(function(x,p){var t=l(p),f="";
4h.ssl&&(f="s");
5t.hasClass("rssFeed")||t.addClass("rssFeed");
6if(null==d)return!1;
70<h.offset&&(h.offset-=1);
8
9h.limit+=h.offset;f="http"+f+"://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+ encodeURIComponent(d);
10f+="&num="+h.limit;h.historical&&(f+="&scoring=h");
11null!=h.key&&(f+="&key="+h.key);
12
13l.getJSON(f+"&output=json_xml",function(j){if(200==j.responseStatus){var f=j.responseData,e=h;
14if(j=f.feed){var i=[],c=0,d="",u="odd";
15
16if(e.media){var m=f.xmlString;
17"Microsoft Internet Explorer"==navigator.appName?(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(m)):c=(new DOMParser).parseFromString(m,"text/xml");m=c.getElementsByTagName("item")}e.header&&(d+='<div class="rssHeader"><a href="'+
18j.link+'" title="'+j.description+'">'+j.title+"</a></div>");d+='<div class="rssBody"><ul>';
19
20
21for(f=e.offset;f<j.entries.length;f++){c=f-e.offset;i[c]=[];var g=j.entries[f],a,b="",k=g.link;switch(e.sort){case "title":b=g.title;break;case "date":b=g.publishedDate}i[c].sort=b;
22
23if(g.publishedDate)switch(b=new Date(g.publishedDate),a=b.toLocaleDateString()+" "+b.toLocaleTimeString(),e.dateformat){case "datetime":break;
24case "date":a=b.toLocaleDateString();break;
25case "time":a=b.toLocaleTimeString();break;
26case "timeline":a=new Date(b);a=Math.round(((new Date).getTime()-a.getTime())/1E3);60>a?a="< 1 min":(3600>a?(a=Math.round(a/60)-1,b="min"):86400>a?(a=Math.round(a/3600)-1,b="hour"):604800>a?(a=Math.round(a/86400)-1,b="day"):(a=Math.round(a/604800)-1,b="week"),1<a&&(b+="s"),a=a+" "+b);
27break;
28
29default:a=b,b=new Date(a),a=e.dateformat,a=a.replace("dd",n(b.getDate())),a=a.replace("MM",n(b.getMonth()+1)),a=a.replace("yyyy",b.getFullYear()),a=a.replace("hh",n(b.getHours())),a=a.replace("mm",n(b.getMinutes())),a=a.replace("ss",
30n(b.getSeconds()))}e.linkredirect&&(k=encodeURIComponent(k));
31
32
33i[c].html="<"+e.titletag+'><a href="'+e.linkredirect+k+'" title="'+g.title+'">'+g.title+"</a></"+e.titletag+">";
34
35e.date&&a&&(i[c].html+="<div>"+a+"</div>");
36//e.content&&(g=e.snippet&&""!=g.contentSnippet?g.contentSnippet:g.content,e.linkcontent&&(g='<a href="../../std/js/'+e.linkredirect+k+'" title="View this feed at '+j.title+'">'+g+"</a>"),i[c].html+='<div>'+g+'</div>');
37
38if(e.media&&0<m.length&&(k=m[f].getElementsByTagName("enclosure"),0<
39k.length)){i[c].html+='<div class="rssMedia"><div>Media files</div><ul>';
40
41for(g=0;g<k.length;g++){var q=k[g].getAttribute("url"),r=k[g].getAttribute("type"),s=k[g].getAttribute("length"),b=i[c],w=i[c].html,q='<li><a href="'+q+'" title="Download this media">'+q.split("/").pop()+"</a> ("+r+", ",r=Math.floor(Math.log(s)/Math.log(1024)),s=(s/Math.pow(1024,Math.floor(r))).toFixed(2)+" "+"bytes kb MB GB TB PB".split(" ")[r];b.html=w+(q+s+")</li>")}i[c].html+="</ul></div>"}}e.sort&&i.sort(function(a,b){if(e.sortasc)var c=
42a.sort,d=b.sort;
43
44else c=b.sort,d=a.sort;
45
46if("date"==e.sort)return new Date(c)-new Date(d);c=c.toLowerCase();d=d.toLowerCase();
47
48return c<d?-1:c>d?1:0});l.each(i,function(a){d+='<li class="rssRow '+u+'">'+i[a].html+"</li>";
49
50u="odd"==u?"even":"odd"});
51d+="</ul></div>";
52l(p).html(d);
53l("a",p).attr("target",e.linktarget)}l.isFunction(v)&&v.call(this,t)}else h.showerror&&(c=""!=h.errormsg?h.errormsg:j.responseDetails),l(p).html('<div class="rssError"><p>'+c+"</p></div>")})})};
54
55var n=function(d){d+="";2>d.length&&
56(d="0"+d);return d}})(jQuery);

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.