-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew.index.js
155 lines (155 loc) · 17.6 KB
/
new.index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/* kadantv
* https://www.kadantv.com */
document.write;
var loadToc, loadCategories, _toc = {
init: function() {
var cfg = {
homePage: window.location.origin,
maxResults: 9,
numChars: 270,
thumbWidth: 350,
thumbHeight: 95,
navText: "more ▼",
resetToc: "Turn to all the articles",
noImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAD6BAMAAAAimIM+AAAALVBMVEXt7e3v7+/p6enr6+vj4+Ph4eHb29vY2Njf39/m5ubV1dXS0tLKysrq6uri4uIrsnXfAAAcwElEQVR4XtTWvW4TQRSG4W93aFxY2kuIMhRQRBrtEeV2CzUSSuiiSEEzpIcxoqJAUSiQLP5EAxewBdcS2TVdBLfBydi7mY1o1jMbj98r+PRojr2gxINIPJBKOxakpNsJQZFwTpDSbVcEVap1gpRoOyQokswTpBTbLUE1bg5kYLcEadRWIMO6Y8EqWFCMGKlqfxkqOOo5llLIlAVLCUgKFRzteon3AVW4IMWv8wPyZAUXSyDLsimJYf1HcIy/AuH2ARAyXDD+9bLfJZCh4GSCgu0+1+8IgipqpGhfASjEnzkLloFXHP+Qu31H+h2APDXBdl9+pO0pn7FYRniDJOJEXLXed66teQFOxhCkKDm/AwUUxUQbo60uOKkGNbJg5fZhojlr9B6AKopgnPNlPwAZ7vE6a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OIHjCTPmA/sz6xeGB7IQOAdWjRi7BFHetj1cDEihLUDXoRusPrT89GRyH3e4nMWAOQY53gzVCS0oUhBTx6ZbWZmTHzRgwryBKPNn6UKqgqjs8W9O62TM4XFQQcdv2dLYZ/vlyBQFdtq5He4jGULxTM7gIAZP5BEO87zxn+YKqjtnzW4PGIA7svkE3nAgm8wiiG9lTqSuqGkFA8w3DEysGnUPXmVswDfF4F0cVgtx/jSka5zCTL7ydsxdzCUrZ2zc1nqg6Qbnrb2r8NxLEbmcuQanKNSA+VaVgkiJKvPCFd+v88t+CuEvxNvl9RFWVIBNK+aJXgwSb2LmYLZiGssdAlQtyRxD0ms4NxueXH/p/F5SqnPHusGUIckcQBECD/S5+vOzdLxiqMtUV1lm2oNw4tM513t0viO6W4vFQzrR0QUDE9ms8P7pPUMpejc2mBMVqKYJ0qdfsOXz1h+CveDROBAMazx814sdy73QrLgiIzhqHblowlL1wvjIRBBDBqZOsKCi9U62oIBE6HHXRYRSksqc5Hs390IIK0PXt2NwRjHXFj8kvmNxpZQjSlVS7Z1CFa5I0xANIolEeQYitHMEkNX1rx1ePkgbF47IHNHoiCA8sCA3Eke2e8Q8rULxwvgKwmGBchuUISrX2hBjrih9aRBBCK0mQbw8Prb2heKGuyPQVCsYRPEjeLP1RUBLwtCkl5LoirNRgcUGBmCkYjRMIXjI9REGyEEG6g42T85UwdxFBoFaiICcQlSTGqlZQHGYLQhQM0YQdigtGnFk7Ex9SEKAEQTUtGIyWJqhyCUajagSLr0GAZQvC/y+oliW4WoOrNbhag6s1uFqDPwHTfhE69WHhVgAAAABJRU5ErkJggg==",
loading: "<span>wait a little bit . . .</span>",
counting: "<div>wait a little bit . . .</div>",
searching: "<span>Search . . .</span>"
},
w = window,
d = document,
el = function(id) {
return d.getElementById(id);
},
o = {
a: el('feed-order'),
b: el('label-sorter').parentNode,
c: el('post-searcher'),
d: el('feed-q'),
e: el('result-desc'),
f: el('feed-container'),
g: el('feed-nav'),
h: d.getElementsByTagName('head')[0],
i: 0,
j: null,
k: 'published',
l: 0,
m: ""
},
fn = {
a: function() {
old = el('temporer-script');
old.parentNode.removeChild(old);
},
b: function(param) {
var script = d.createElement('script');
script.type = "text/javascript";
script.id = "temporer-script";
script.src = param;
if (el('temporer-script')) fn.a();
o.h.appendChild(script);
},
c: function(mode, tag, order) {
o.i++;
o.e.innerHTML = cfg.counting;
o.g.innerHTML = cfg[mode == 1 ? "searching" : "loading"];
if (mode === 0) {
fn.b(tag !== null ? cfg.homePage + '/feeds/posts/summary/-/' + tag + '?alt=json-in-script&start-index=' + ((o.i * cfg.maxResults) + 1) + '&max-results=' + cfg.maxResults + '&orderby=' + order + '&callback=loadToc' : cfg.homePage + '/feeds/posts/summary?alt=json-in-script&start-index=' + ((o.i * cfg.maxResults) + 1) + '&max-results=' + cfg.maxResults + '&orderby=' + order + '&callback=loadToc');
} else if (mode == 1) {
fn.b(cfg.homePage + '/feeds/posts/summary?alt=json-in-script&start-index=' + ((o.i * cfg.maxResults) + 1) + '&max-results=' + cfg.maxResults + '&q=' + tag + '&orderby=' + order + '&callback=loadToc');
}
o.j = (tag !== null) ? tag : null;
o.l = mode;
o.a.disabled = true;
o.b.children[0].disabled = true;
},
d: function(json) {
var _h;
o.g.innerHTML = "";
o.e.innerHTML = o.l == 1 ? '<span>Keyword search results<b>“' + o.m + '”</b> (' + json.feed.openSearch$totalResults.$t + ' Results)</span>' : '<div>Total : ' + json.feed.openSearch$totalResults.$t + ' article</div>';
if ("entry" in json.feed) {
var a = json.feed.entry,
b, c, _d, e = "0 Komentar",
f = "",
g;
for (var i = 0; i < cfg.maxResults; i++) {
if (i == a.length) break;
b = a[i].title.$t;
_d = ("summary" in a[i]) ? a[i].summary.$t.replace(/<br ?\/?>/ig, " ").replace(/<(.*?)>/g, "").replace(/<iframe/ig, "").substring(0, cfg.numChars) : "";
g = ("media$thumbnail" in a[i]) ? a[i].media$thumbnail.url.replace(/.*?:\/\//g, "//").replace(/\/s[0-9]+\-c/, "\/s" + cfg.thumbWidth + "") : cfg.noImage.replace(/\/s[0-9]+\-c/, "\/s" + cfg.thumbWidth + "");
for (var j = 0, jen = a[i].link.length; j < jen; j++) {
c = (a[i].link[j].rel == "alternate") ? a[i].link[j].href : "#";
}
for (var k = 0, ken = a[i].link.length; k < ken; k++) {
if (a[i].link[k].rel == "replies" && a[i].link[k].type == "text/html") {
e = a[i].link[k].title;
break;
}
}
_h = d.createElement('li');
_h.innerHTML = '<div class="inner"><img style="width:' + cfg.thumbWidth + 'px;height:' + cfg.thumbHeight + 'px;" src="' + g + '" alt="' + b + '"><a class="toc-title" href="' + c + '" target="_blank" title="' + b + '">' + b + '</a><div class="news-text"><div>' + _d + '…</div><br style="clear:both;"><a class="btn btn-primary btn-sm toc-read" href="' + c + '" target="_blank" title="Watch">Watch</a></div></div>';
o.f.appendChild(_h);
}
_h = d.createElement('a');
_h.href = '#load-more';
_h.innerHTML = cfg.navText;
_h.onclick = function() {
fn.c(o.l, o.j, o.k);
return false;
};
} else {
_h = d.createElement('a');
_h.href = '#reset-content';
_h.innerHTML = cfg.resetToc;
_h.onclick = function() {
o.i = -1;
o.e.innerHTML = cfg.counting;
o.f.innerHTML = "";
fn.c(0, null, 'published');
o.a.innerHTML = o.a.innerHTML;
o.b.children[0].innerHTML = o.b.children[0].innerHTML;
return false;
};
}
o.g.appendChild(_h);
o.a.disabled = false;
o.b.children[0].disabled = false;
},
e: function(json) {
var a = json.feed.category,
b = '<select id="label-sorter"><option value="" selected disabled>Category . . . </option>';
for (var i = 0, len = a.length; i < len; i++) {
b += '<option value="' + encodeURIComponent(a[i].term) + '">' + a[i].term.toLowerCase() + '</option>';
}
b += '</select>';
o.b.innerHTML = b;
o.b.children[0].onchange = function() {
o.i = -1;
o.f.innerHTML = "";
o.g.innerHTML = cfg.loading;
fn.c(0, this.value, o.k);
};
}
};
loadToc = fn.d;
loadCategories = fn.e;
fn.b(cfg.homePage + '/feeds/posts/summary?alt=json-in-script&start-index=' + (o.i + 1) + '&max-results=' + cfg.maxResults + '&orderby=published&callback=loadToc');
fn.b(cfg.homePage + '/feeds/posts/summary?alt=json-in-script&max-results=0&orderby=published&callback=loadCategories');
o.a.onchange = function() {
o.i = -1;
o.f.innerHTML = "";
o.g.innerHTML = cfg.counting;
o.b.children[0].innerHTML = o.b.children[0].innerHTML;
fn.c(0, null, this.value);
o.k = this.value;
};
o.c.onsubmit = function() {
o.i = -1;
o.f.innerHTML = "";
o.m = o.d.value;
fn.c(1, o.d.value, o.k);
return false;
};
}
};
_toc.init();