Guest User

Untitled

a guest
Apr 5th, 2017
151
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="table-outer">
  2. <table>
  3. <tbody>
  4. <tr>
  5. <td>
  6. <label for="feed-order">Urutkan artikel berdasarkan:</label>
  7. </td>
  8. <td>
  9. <select id="feed-order">
  10. <option selected="" value="published">Artikel terbaru</option>
  11. <option value="updated">Artikel yang terakhir di update</option>
  12. </select>
  13. </td>
  14. </tr>
  15. <tr>
  16. <td>
  17. <label for="label-sorter">Filter artikel berdasarkan kategori:</label>
  18. </td>
  19. <td>
  20. <select disabled="" id="label-sorter">
  21. <option selected="">Loading....</option>
  22. </select>
  23. </td>
  24. </tr>
  25. <tr>
  26. <td>
  27. <label for="feed-q">Cari artikel dengan kata kunci:</label>
  28. </td>
  29. <td>
  30. <form id="post-searcher">
  31. <input id="feed-q" placeholder="Ketik dan tekan ENTER" type="text" />
  32. </form>
  33. </td>
  34. </tr>
  35. </tbody>
  36. </table>
  37. </div>
  38. <br />
  39. <header id="result-desc"></header>
  40. <br />
  41. <ul id="feed-container"></ul>
  42. <div id="feed-nav">
  43. </div>
  44.  
  45. <script type="text/javascript">
  46. // Get the head element
  47. var head = document.head || document.getElementsByTagName('head')[0];
  48.  
  49. // Create a new style node
  50. var style = document.createElement('style');
  51.  
  52. // Set type attribute for the style node
  53. style.type = 'text/css';
  54.  
  55. // Set the css rules
  56. var css = '#table-outer{padding:7px 10px;margin:0 auto}#table-outer table{width:auto;margin:0 auto;border:none!important}#table-outer table td{border:none!important;padding:0!important}#table-outer form{font:inherit}#table-outer label{display:block;text-align:right;margin:0 10px 0 0;padding:4px 0 0}#table-outer select[disabled]{opacity:.4}#post-searcher{display:block;margin:0;padding:0}#table-outer input,#table-outer select{width:100%;border:1px solid #dedede;border-radius:5px;margin:0;padding:5px;font-family:Roboto,sans-serif!important;font-size:16px!important;font-weight:500!important;text-transform:capitalize!important;outline:0;color:#333!important;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#table-outer select option{min-height:1.4em!important}#table-outer input#feed-q{padding:5px 10px!important}#feed-container{background:#fff;display:block;clear:both;margin:0;padding:0;list-style:none;overflow:hidden;position:relative;border-top:none}#feed-container li{list-style:none;margin:0;padding:0;border-top:1px solid #eee;color:#555;width:auto;float:left;display:inline}#feed-container li .inner{margin:15px 0;height:auto;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis}#feed-container li a{text-decoration:none;color:#2C2C2C;font-weight:500}#feed-container li a:hover{text-decoration:none;color:#E94141}#feed-container li .news-text{margin-top:5px;line-height:1.3em!important}#feed-container li img{margin:0 15px 5px 0;padding:7px 7px 7px 0;float:left;display:block;width:140px!important}#result-desc{margin:0;padding:0}#result-desc div,#result-desc span{display:block;margin:0;padding:5px 0 7px;color:#D64D52}#result-desc div{color:inherit}#feed-nav{margin:10px 0 30px;text-align:center;font-weight:500}#feed-nav a,#feed-nav span{border:1px solid #dedede;border-radius:5px;padding:0;color:#757575;text-decoration:none;display:block;height:30px;line-height:32px}#feed-nav a,#feed-nav span:hover{color:#1B1B1B}#feed-nav a:active,#feed-nav a:hover{color:#555}#feed-nav span{cursor:wait}@media (max-width:600px){#table-outer table{margin:0 auto;width:100%}#feed-container,#table-outer{margin:0 auto}#feed-container li .inner{margin:5px auto;height:auto}#feedContainer li{float:none;display:block;width:auto;height:auto}#feed-container li .news-text,#feedContainer:after,#feed-container li img{display:none!important}}.post-body{min-height:300px;background:url(https://lh6.googleusercontent.com/-UKClHRpzskg/VfOm1eLfT7I/AAAAAAAAiQw/1pwwhEsT49I/w220-h19-no/ajax-loader%2B%25281%2529.gif)50% 50% no-repeat!important}';
  57.  
  58. // Append the css rules to the style node
  59. style.appendChild(document.createTextNode(css));
  60.  
  61. // Append the style node to the head of the page
  62. head.appendChild(style);
  63. </script>
  64.  
  65. <script type='text/javaScript'>
  66. document.write;
  67. var loadToc, loadCategories, _toc = {
  68. init: function() {
  69. var cfg = {
  70. homePage: window.location.origin,
  71. maxResults: 10,
  72. numChars: 270,
  73. thumbWidth: 140,
  74. thumbHeight: 95,
  75. navText: "Tampilkan artikel selanjutnya &#9660;",
  76. resetToc: "Kembali ke Awal",
  77. noImage: "//2.bp.blogspot.com/-ex3V86fj4dQ/UrCQQa4cLsI/AAAAAAAAFdA/j2FCTmGOrog/s1100/no-thumbnail.png",
  78. loading: "<span>Memuat...</span>",
  79. counting: "<div>Memuat artikel...</div>",
  80. searching: "<span>Mencari...</span>"
  81. },
  82. w = window,
  83. d = document,
  84. el = function(id) {
  85. return d.getElementById(id);
  86. },
  87. o = {
  88. a: el('feed-order'),
  89. b: el('label-sorter').parentNode,
  90. c: el('post-searcher'),
  91. d: el('feed-q'),
  92. e: el('result-desc'),
  93. f: el('feed-container'),
  94. g: el('feed-nav'),
  95. h: d.getElementsByTagName('head')[0],
  96. i: 0,
  97. j: null,
  98. k: 'published',
  99. l: 0,
  100. m: ""
  101. },
  102. fn = {
  103. a: function() {
  104. old = el('temporer-script');
  105. old.parentNode.removeChild(old);
  106. },
  107. b: function(param) {
  108. var script = d.createElement('script');
  109. script.type = "text/javascript";
  110. script.id = "temporer-script";
  111. script.src = param;
  112. if (el('temporer-script')) fn.a();
  113. o.h.appendChild(script);
  114. },
  115. c: function(mode, tag, order) {
  116. o.i++;
  117. o.e.innerHTML = cfg.counting;
  118. o.g.innerHTML = cfg[mode == 1 ? "searching" : "loading"];
  119. if (mode === 0) {
  120. 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');
  121. } else if (mode == 1) {
  122. 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');
  123. }
  124. o.j = (tag !== null) ? tag : null;
  125. o.l = mode;
  126. o.a.disabled = true;
  127. o.b.children[0].disabled = true;
  128. },
  129. d: function(json) {
  130. var _h;
  131. o.g.innerHTML = "";
  132. o.e.innerHTML = o.l == 1 ? '<span>Hasil penelusuran untuk kata kunci <b>&#8220;' + o.m + '&#8221;</b> (' + json.feed.openSearch$totalResults.$t + ' Hasil)</span>' : '<div>Total: ' + json.feed.openSearch$totalResults.$t + ' Artikel</div>';
  133. if ("entry" in json.feed) {
  134. var a = json.feed.entry,
  135. b, c, _d, e = "0 Komentar",
  136. f = "",
  137. g;
  138. for (var i = 0; i < cfg.maxResults; i++) {
  139. if (i == a.length) break;
  140. b = a[i].title.$t;
  141. _d = ("summary" in a[i]) ? a[i].summary.$t.replace(/<br ?\/?>/ig, " ").replace(/<(.*?)>/g, "").replace(/<iframe/ig, "").substring(0, cfg.numChars) : "";
  142. 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 + "");
  143. for (var j = 0, jen = a[i].link.length; j < jen; j++) {
  144. c = (a[i].link[j].rel == "alternate") ? a[i].link[j].href : "#";
  145. }
  146. for (var k = 0, ken = a[i].link.length; k < ken; k++) {
  147. if (a[i].link[k].rel == "replies" && a[i].link[k].type == "text/html") {
  148. e = a[i].link[k].title;
  149. break;
  150. }
  151. }
  152. _h = d.createElement('li');
  153. _h.innerHTML = '<div class="inner"><img style="width:' + cfg.thumbWidth + 'px;height:' + cfg.thumbHeight + 'px;" data-src="' + g + '" src="' + g + '" alt="' + b + '" title="' + b + '"><a class="toc-title" href="' + c + '" target="_blank" title="' + b + '">' + b + '</a><div class="news-text">' + _d + '&hellip;<br style="clear:both;"></div></div>';
  154. o.f.appendChild(_h);
  155. }
  156. _h = d.createElement('a');
  157. _h.href = '#load-more';
  158. _h.innerHTML = cfg.navText;
  159. _h.onclick = function() {
  160. fn.c(o.l, o.j, o.k);
  161. return false;
  162. };
  163. } else {
  164. _h = d.createElement('a');
  165. _h.href = '#reset-content';
  166. _h.innerHTML = cfg.resetToc;
  167. _h.onclick = function() {
  168. o.i = -1;
  169. o.e.innerHTML = cfg.counting;
  170. o.f.innerHTML = "";
  171. fn.c(0, null, 'published');
  172. o.a.innerHTML = o.a.innerHTML;
  173. o.b.children[0].innerHTML = o.b.children[0].innerHTML;
  174. return false;
  175. };
  176. }
  177. o.g.appendChild(_h);
  178. o.a.disabled = false;
  179. o.b.children[0].disabled = false;
  180. },
  181. e: function(json) {
  182. var a = json.feed.category,
  183. b = '<select id="label-sorter"><option value="" selected disabled>Pilih Kategori...</option>';
  184. for (var i = 0, len = a.length; i < len; i++) {
  185. b += '<option value="' + encodeURIComponent(a[i].term).replace(/%20/g, " ") + '">' + encodeURIComponent(a[i].term).replace(/%20/g, " ") + '</option>';
  186. }
  187. b += '</select>';
  188. o.b.innerHTML = b;
  189. o.b.children[0].onchange = function() {
  190. o.i = -1;
  191. o.f.innerHTML = "";
  192. o.g.innerHTML = cfg.loading;
  193. fn.c(0, this.value, o.k);
  194. };
  195. }
  196. };
  197. loadToc = fn.d;
  198. loadCategories = fn.e;
  199. fn.b(cfg.homePage + '/feeds/posts/summary?alt=json-in-script&start-index=' + (o.i + 1) + '&max-results=' + cfg.maxResults + '&orderby=published&callback=loadToc');
  200. fn.b(cfg.homePage + '/feeds/posts/summary?alt=json-in-script&max-results=0&orderby=published&callback=loadCategories');
  201. o.a.onchange = function() {
  202. o.i = -1;
  203. o.f.innerHTML = "";
  204. o.g.innerHTML = cfg.counting;
  205. o.b.children[0].innerHTML = o.b.children[0].innerHTML;
  206. fn.c(0, null, this.value);
  207. o.k = this.value;
  208. };
  209. o.c.onsubmit = function() {
  210. o.i = -1;
  211. o.f.innerHTML = "";
  212. o.m = o.d.value;
  213. fn.c(1, o.d.value, o.k);
  214. return false;
  215. };
  216. }
  217. };
  218. _toc.init();</script>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×