BloggerScript: Javascript Library khusus Blogger

BloggerScript adalah javascript yang khusus di desain untuk website berbasis "Blogger", dan berfungsi sebagai peringkas script, mempercepat…
BloggerScript: Javascript Library khusus Blogger

BloggerScript adalah javascript yang khusus di desain untuk website berbasis "Blogger", dan berfungsi sebagai peringkas script, mempercepat web, dll.

Bagi yang suka membuat script tentang blogger khusus nya script untuk mengambil "Feed" yang berupa data json, dengan "BloggerScript" ini maka proses nya akan lebih simpel.

Postingan ini akan menjelaskan bagaimana dan perbedaan menggunakan BloggerScript atau tidak. Jadi langsung saja pasang script nya.

Cara Memasang BloggerScript

Pasang kode javascript berikut di atas tag </head> pada template blogger kalian.

<script type='text/javascript'>/*<![CDATA[*/
  "use strict";class BloggerScript{constructor(a={}){this.config=a,this._siteMap={arr:new Array,callback:"undefined",fc:"function",max:150,start:1,url:"url"}}siteMap(b,c=function(a){console.log(a)}){let a=this;a.xhr("GET",`${b}?alt=json-in-script&start-index=${a._siteMap.start}&max-results=${a._siteMap.max}`,function(d){if("entry"in d.feed){let e=d.feed.entry;Array.prototype.push.apply(a._siteMap.arr,a.getFeed(d)),e.length>=a._siteMap.max?(a._siteMap.start+=a._siteMap.max,a.siteMap(b,c)):c(a._siteMap.arr)}else c(a._siteMap.arr)})}getFeed(a){if(a.feed.entry){let b=new Array;return a.feed.entry.forEach(a=>{let c={};c.title=a.title.$t,c.link=this.getLink(a.link),c.image=this.getImage(a),c.label=this.getLabel(a.category),c.date=this.getTime(a.published.$t),c.published=a.published.$t,c.updated=a.updated.$t,"summary"in a&&(c.summary=a.summary.$t),"content"in a&&(c.content=a.content.$t),"author"in a&&(c.author=this.getAuthor(a)),b.push(c)}),b}return[]}getImage(a){if("media$thumbnail"in a)return this.resizeImage(a.media$thumbnail.url);if(!("content"in a))return this.config.noImage||"";{let b=a.content.$t,d=b.indexOf("<img"),c=b.indexOf('src="',d),e=b.indexOf('"',c+5),f=b.substr(c+5,e-c-5);return -1!=d&& -1!=c&& -1!=e&&""!=f?f:this.config.noImage||""}}getAuthor(a){var b,c,d,e,f,g;return{name:(null===(b=a.author[0])|| void 0===b?void 0:null===(c=b.name)|| void 0===c?void 0:c.$t)||"",link:(null===(d=a.author[0])|| void 0===d?void 0:null===(e=d.uri)|| void 0===e?void 0:e.$t)||"",image:(null===(f=a.author[0])|| void 0===f?void 0:null===(g=f.gd$image)|| void 0===g?void 0:g.src)||""}}getLink(a){return a.find(a=>"alternate"==a.rel).href}getLabel(a){return a.map(a=>a.term)}getTime(c){if(/([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/.test(c)){var b=c,d=b.substring(0,4),e=b.substring(5,7),f=b.substring(8,10),a=new Array;return a[1]="Jan",a[2]="Feb",a[3]="Mar",a[4]="Apr",a[5]="May",a[6]="Jun",a[7]="Jul",a[8]="Aug",a[9]="Sep",a[10]="Oct",a[11]="Nov",a[12]="Dec",f+" "+a[parseInt(e,10)]+" "+d}return!1}resizeImage(a){return this.config.sizeImage?a.match(/\/s[0-9]{2}-(w[0-9]+-)?c/)?a.replace(/\/s[0-9]{2}-(w[0-9]+-)?c/,`/${this.config.sizeImage}`):a.replace(/\=s[0-9]{2}-(w[0-9]+-)?c/,`=${this.config.sizeImage}`):a}relatedPost(b=function(a){console.log(a)}){let a=this,c=0,d=new Array,e=document.location.pathname;"undefined"!=a.config.label&&""!=a.config.label&&0!=a.config.label.length&&a.config.label.forEach(f=>{a.xhr("GET",`/feeds/posts/default/-/${f.replace(/\&amp;/g,"&").replace(/\//g,"%2F")}?alt=json-in-script&max-results=${a.config.jumlah}`,function(g){if("entry"in g.feed&&a.getFeed(g).forEach(a=>{!a.link.includes(e)&&(d.some(b=>b.link==a.link)||d.push(a))}),++c==a.config.label.length){if(0==d.length)return!1;let f=a.shuffle(d);return f.length>a.config.jumlah&&(f=f.slice(0,a.config.jumlah)),b(f)}})})}randomPost(b,c=function(a){console.log(a)}){let a=this,d=a.config.jumlah;a.xhr("GET",`${b}?alt=json-in-script&max-results=0`,function(f){let e=f.feed.openSearch$totalResults.$t;if(a.config.allRandom)e=e<=150?1:a.shuffle2(1,e-150),d=150;else{if(e<a.config.jumlah)return;e=a.shuffle2(1,e-a.config.jumlah)}a.xhr("GET",`${b}?alt=json-in-script&start-index=${e}&max-results=${d}`,function(b){if("entry"in b.feed){let d=a.getFeed(b);return c(d=a.shuffle(d))}})})}shuffle(a){var c,d,b=a.length;if(0===b)return!1;for(;--b;)c=Math.floor(Math.random()*(b+1)),d=a[b],a[b]=a[c],a[c]=d;return a}shuffle2(a,b){return Math.floor(Math.random()*(b-a))+a}xhr(b,c,d){let a=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");a.onreadystatechange=function(){if(4==this.readyState&&200==this.status||304==this.status){let a=this.responseText,b=JSON.parse(a.substring(a.indexOf("{"),a.lastIndexOf("}")+1));d&&d(b)}},a.onerror=a=>console.log(a),a.open(b,c,!0),a.send()}inTag(b){let a=document.createElement("script");a.src=b,document.body.appendChild(a)}}
/*]]>*/</script>

Jika sudah di pasang kita lihat perbedaan dalam pembuatan script nya. Di sini saya akan menulis script untuk mengambil feed blogger.

Pertama script yang tidak memakai "BloggerScript".

function createFeed(e) {
  let entry = e.feed.entry;
  entry.forEach(item => {
    let title = item.title.$t,
      link = '',
      summary = item.summary.$t,
      image = item.media$thumbnail.url ? item.media$thumbnail.url : 'url_noImage';
    for (let inz = 0; inz < i.link.length; inz++) {
      let el = link[inz];
      if ('alternate' == el.rel) {
        link = el.href;
        break;
      }
    }
  })
}

Script di atas untuk mengambil gambar dan link saja kode nya sudah cukup panjang belum lagi gambar nya belum di resize dan belum support untuk postingan yang pakai gambar bukan dari bloggger.

Selanjut nya script jika pakai "BloggerScript".

let bS = new BloggerScript({
  noImage: 'Url_Gambar',
  sizeImage: 'w207-h300'
})

function createFeed(e) {
  let entry = bS.getFeed(e);
  entry.forEach(item => {
    let title = item.title,
      link = item.link,
      image = item.image,
      date = item.date,
      summary = item.summary;
  })
}

Script yang memakai "BloggerScript" untuk mengambil data menjadi lebih simpel bahkan gambar nya sudah di resize dan sudah support untuk postingan yang pakai gambar bukan dari blogger.

Cara Menggunakan BloggerScript

Kalian sudah melihat perbedaan dalam menggunakan BloggerScript dengan yang tidak, sekarang adalah cara menggunakan nya. Kalian hanya perlu membuat variable baru dengan nama terserah kalian misal:

let script1 = new BloggerScript({
  noImage: 'Url_Gambar',
  sizeImage: 'w480-h320'
})

Di atas kita membuat variable script1. Jadi kita hanya perlu menggunakan fungsi-fungsi nya saja. Berikut Daftar Fungsi nya.

xhr

xhr ini berfungsi untuk memanggil script feed dari blogger. Sebelum nya kita lihat dulu script yang tidak menggunakan "BloggerScript".

<script>
  function getPost(e) {
    ...........
  }
</script>
<script src='/feeds/posts/default?alt=json-in-script&max-results=10&callback=getPost'></script>

Sedangkan xhr seperti ini.

<script>
  function getPost(e) {  
    ...........
  }
  script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', getPost)
</script>

Atau bisa juga begini.

<script>
  script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', function(e) {
    ...........
  })
</script>

Kelihatan simpel bukan. Oke lanjut sekarang adalah fungsi untuk mengisi bagian function nya.

getFeed

getFeed ini hasil nya berupa array object yang akan secara otomatis mengambil semua data. Berikut data yang di ambil.

Key Desc
title Mengambil Judul Postingan
link Mengambil Link Postingan
image Mengambil Gambar yang langsung di resize
label Mengambil Daftar Label Postingan berupa array.
date Mengambil tanggal postingan
summary Snippet Post versi pendek
content Snippet Post versi panjang
author berupa object untuk mengambil nama, link dan gambar author. (author.name, author.link, author.image)

Berikut contoh script nya jika di pasang kedalam function getPost.

<script>
  function getPost(e) {  
    let entry = (script1.getFeed(e));
    entry.forEach(item => {
      item.title;
      item.image;
      item.link;
      item.date;
      item.label;
      item.summary;
      item.content;
      item.author.name;
      item.author.link;
      item.author.image
    });
  }
  script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', getPost)
</script>

Adapun Fungsi yang lain adalah versi manual dari fungsi getFeed.

Fungsi Manual dari getFeed.

Key Desc
getLink Mengambil Link Postingan
getImage Mengambil Gambar yang langsung di resize
getLabel Mengambil Daftar Label Postingan berupa array.
getTime Mengambil tanggal postingan
getAuthor Mengambil data penulis (Berupa object)

Contoh nya.

<script>
  function getPost(e) {  
    let entry = e;
    entry.forEach(item => {
      let link = script1.getLink(item.link);
      let image = script1.getImage(item);
      let date = script1.getTime(item.published.$t);
      let label = script1.getLabel(item.category);
      let author = script1.getAuthor(item);
    });
  }
  script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', getPost)
</script>

Sampai sini dulu nanti fitur nya akan di tambahin setelah update berikut nya.

Bonus Script

<ul id='output'></ul>
<script>
  let script1 = new BloggerScript({
    noImage: 'Url_Noimage',
    sizeImage: 'w480-h320'
  })
  function getPost(e) {  
    let entry = script1.getFeed(e);
    let html = '';
    entry.forEach(item => {
      html += `<li><img src='${item.image}'/><a href='${item.link}'>${item.title}</a><div>${item.date}</div></li>`;
    });
    document.getElementById('output').innerHTML = html;
  }
  script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', getPost)
</script>
69
BloggerScript: Javascript Library khusus Blogger
BloggerScript: Javascript Library khusus Blogger
BloggerScript adalah javascript yang khusus di desain untuk website berbasis "Blogger", dan berfungsi sebagai peringkas script, mempercepat…
Bagikan ke aplikasi lainnya:
  • WhatsApp
  • Telegram
  • Facebook
  • Twitter
  • Pinterest
  • LinkedIn

Artikel Terkait

69 komentar

  • Menulis kode gunakan <i>kode</i> (kode harus di parse)
  • Menulis dalam syntax highlighter gunakan <em>kode panjang</em> (kode harus di-parse)
  • Menyisipkan gambar gunakan <strong>URL GAMBAR</strong> (ekstensi .jpg, .png, .gif, .webp, .ico)
  • Centang Beri Tahu Saya untuk mendapatkan notifikasi ke email saat ada yang membalas komentar.
  • Berkas Kita
    Saturday, July 09, 2022
    Profile: https://www.blogger.com/profile/05392949523370725401
    keren bang, akhirnya web nya kebuka lagi.
  • Wernayasa
    Saturday, July 09, 2022
    Profile: https://www.blogger.com/profile/09171272848542294839
    Akhirnya balik lagi.
    Bagaimana dengan postingan lama, apakah hilang atau nanti di post ulang?
  • Berkas Kita
    Thursday, July 14, 2022
    Profile: https://www.blogger.com/profile/05392949523370725401
    bang saran BloggerScript kasih komen versi biar mudah dilihat kalok ada update/pembaruan V.1, V.2 dan seterusnya

    // BloggerScript V.1
    BloggerScript....


    saran saja bang
    • Wernayasa
      Friday, July 15, 2022
      Profil: https://www.blogger.com/profile/09171272848542294839
      Baru mau komment, duluan kamu.
      Iya, biar gampang melacak versinya.

      Menurutku ini lebih cocok disebut framework, biar kedengaran keren aja.
  • Dani_Edtz_
    Thursday, July 21, 2022
    Profile: https://www.blogger.com/profile/17902859638216038844
    thanks bang sangat cocok buat saya yang pengen bisa javascript tapi males belajar🗿
  • true
    Monday, July 25, 2022
    Profile: https://www.blogger.com/profile/03791865258710224921
    bang untuk custom post gimana bang?
    script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', getPost)
    script1.xhr('GET', '/feeds/posts/default/-/LABEL?alt=json-in-script&max-results=10', getPost)
    supaya ngisi label gak manual gimana ya bang?
    • Шош. Сом
      Monday, July 25, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      yang no 2 sudah benar itu.
    • true
      Monday, July 25, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      dah coba memang bisa, kayak kurang enak saja gitu. mau nya pakek var : nama label gitu, bisa kah bang
    • Шош. Сом
      Monday, July 25, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      kaya gini.let customLabel: "Series";
      script1.xhr('GET', `/feeds/posts/default/-/${customLabel}?alt=json-in-script&max-results=10`, getPost)
    • Шош. Сом
      Monday, July 25, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      ralat let customLabel = "Series"
    • true
      Monday, July 25, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      makasih bisa bang
    • true
      Monday, July 25, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      untuk filter label bang
      var postLabel2 = i.category.map(function(e) {
      if(e.term == '1080p' || e.term == '720p' || e.term == '480p' || e.term == '360p' || e.term == '240p' || e.term == '144p') return e.term;
      }).join(' ');

      biasa nya saya pakek ini, untuk penulisan di bloggerscript gimana bang
    • Шош. Сом
      Tuesday, July 26, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      let script1 = new BloggerScript();

      function getPost(item) {
      //Cara Pertama
      let entry = script1.getFeed(item);
      entry.forEach(post => {
      let label = post.label.map(i => i == '480p' || i == '720p' || i == '1080p').join(', ');
      })

      //Cara kedua
      item.forEach(post => {
      let label = script1.getLabel(post.category).map(i => i == '480p' || i == '720px' || i == '1080p');
      })
      }
      script1.xhr('GET', '/feeds/posts/summary?alt=json-in-script&max-results=20', getPost);
      Begini kira nya.
    • true
      Tuesday, July 26, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      untuk cara pertama cuma muncul true dan false saja.
      untuk cara ke dua malah error bang
    • Dayat
      Tuesday, July 26, 2022
      Profil: https://www.blogger.com/profile/02480525259652322034
      1. ganti map menjadi filter
      2. pada cara kedua ganti item.forEach jadi item.feed.entry.forEach
    • true
      Tuesday, July 26, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      mantap berhasil
    • true
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      bang saya ada judul date a live episode 01
      trus saya mau cuma nampilin date a live nya saja dan sebalik nya episode 01 saja, gimana ya bang?
    • Шош. Сом
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      let title = 'Date A Live Episode 1';
      title = title.split(' Episode')[0];
      console.log(title);
    • true
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      ehh kurang paham bang
      let episode_lainnya = new BloggerScript()
      function el(e) {
      let entry = episode_lainnya.getFeed(e);
      let html = '';
      entry.forEach(item => {
      html += `<li class="bk-Episode"><a href="${item.link}" title="${item.title}"><span title="${item.title}">${item.title}</span></a></li>`;
      });
      document.getElementById('bk-episode-lainnya').innerHTML = html;
      }


      cara menulisannya gimana bang
    • Шош. Сом
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      item.title.split(' Episode')[0]
  • true
    Friday, August 05, 2022
    Profile: https://www.blogger.com/profile/03791865258710224921
    bang kalok sebaliknya bisa kah cuma episode nya muncul
    • Шош. Сом
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      Pakai slice item.title.slice(item.title.indexOf('Episode'))
    • true
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      ohh ya bang dia atas sudah gak bisa koemn lagi apa max 15 ya
    • Шош. Сом
      Friday, August 05, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      nggak, kesalahan nulis tag aja tadi maka nya gak bisa.
    • true
      Wednesday, August 10, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      bang 1 lagi nih tentang buat summary gimana ya?
    • Шош. Сом
      Wednesday, August 10, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      let summary = 'summary' in item ? item.summary : 'Summary Tidak ada';
      let content = 'content' in item ? item.content : 'Tidak ada Content';

      Dalam penulisan url pemanggil summary menjadi seperti ini.
      /feeds/posts/summary
      sedangkan content begini.
      /feeds/posts/default
    • true
      Wednesday, August 10, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      ohhh saya pakek yang content berhasil tapi semua muncul dari gambar, link dll. hah trus caranya biar text saja bisa kah bang, kayang cuma 150 kata gitu
    • Шош. Сом
      Wednesday, August 10, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      let newDiv = document.createElement('div');
      newDiv.innerHTML = 'content' in item ? item.content : 'Tidak ada Content';
      let content = newDiv.innerText.slice(0, 150);

      150 itu panjang text nya.
    • true
      Wednesday, August 10, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      oohh, seumpama saya pekek summary berarti kurang lebih sama juga ya bang. ohh ya berhasil bang makasih
    • true
      Wednesday, August 17, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      bang..
      <div id='output'></div>
      <script>
      let script1 = new BloggerScript({
      noImage: 'Url_Noimage',
      sizeImage: 'w480-h320'
      })
      function getPost(e) {
      let entry = script1.getFeed(e);
      let html = '';
      entry.forEach(item => {
      html += `<div><img src='${item.image}'/><a href='${item.link}'>${item.title}</a><div>${item.date}</div></div>`;
      });
      document.getElementById('output').innerHTML = html;
      }
      script1.xhr('GET', '/feeds/posts/default?alt=json-in-script&max-results=10', getPost)
      </script>


      dan hasilnya :
      <div id='output'>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      </div>

      pertanyaannya bisakah bang menanbah div lagi hasilnya kayak gini...
      <div id='output'>
      <div class="bungkus" id="bungkus">
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      <div><img src='#'/><a href='#'>Judul</a><div>Tgl</div></div>
      </div>
      </div>
    • Шош. Сом
      Friday, August 19, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      ganti yang ini.
      //Awal
      let html = '';

      //Replace
      let html = '<div class="bungkus" id="bungkus">';

      //Awal
      document.getElementById('output').innerHTML = html;

      //Replace
      document.getElementById('output').innerHTML = html + '</div>';
    • Yukine
      Friday, August 19, 2022
      Profil: https://www.blogger.com/profile/16537327212291797418
    • true
      Wednesday, August 31, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      bang saya nyobain buat custom post kayak gini tapi error salahnya di mana bang
      let Rekomen = new BloggerScript({
      noImage: 'Url_Gambar',
      sizeImage: 'w207-h300'
      })

      let customPost = {}
      customPost.run = function(outputDiv, namaLabel, jumlahPost) {
      // outputDiv Postingan Akan Tampil di tag tersebut
      customPost.outputDiv = outputDiv;

      document.write('\x3Cscript type="text/javascript" src="/feeds/posts/default/-/' + namaLabel + '?alt=json&callback=customPost.compile&max-results=' + jumlahPost + '">\x3C/script>')
      }

      function createFeed(e) {
      //Ini mengambil element ber attribute id yang kita tulis di customPost.outputDiv
      let element = document.getElementById(customPost.outputDiv);
      let entry = Rekomen.getFeed(e);
      entry.forEach(item => {
      html += `<li><img src='${item.image}'/><a href='${item.link}'>${item.title}</a><div>${item.date}</div></li>`;
      });
      element.innerHTML = html;
      }

      mohon bantuannya bang
    • true
      Wednesday, August 31, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      nyobain buat custom post kayak dulu.
    • Шош. Сом
      Wednesday, August 31, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      kaya gini.let Rekomen = new BloggerScript({
      noImage: 'Url_Gambar',
      sizeImage: 'w207-h300'
      })

      let customPost = {}
      customPost.run = function(outputDiv, namaLabel, jumlahPost) {
      // outputDiv Postingan Akan Tampil di tag tersebut
      customPost.outputDiv = outputDiv;

      document.write('\x3Cscript type="text/javascript" src="/feeds/posts/default/-/' + namaLabel + '?alt=json&callback=customPost.compile&max-results=' + jumlahPost + '">\x3C/script>')
      }

      customPost.compile = function(e) {
      //Ini mengambil element ber attribute id yang kita tulis di customPost.outputDiv
      let element = document.getElementById(customPost.outputDiv);
      let entry = Rekomen.getFeed(e);
      entry.forEach(item => {
      html += `<li><img src='${item.image}'/><a href='${item.link}'>${item.title}</a><div>${item.date}</div></li>`;
      });
      element.innerHTML = html;
      }
    • true
      Thursday, September 01, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
    • true
      Thursday, September 01, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      baru sempat coba masih error
    • Шош. Сом
      Friday, September 02, 2022
      Profil: https://www.blogger.com/profile/11131198046075365419
      tambahkan let html = ''; di dalam function customPost.compile
    • true
      Sunday, September 18, 2022
      Profil: https://www.blogger.com/profile/03791865258710224921
      bang boleh nambah id post
  • Ryo
    Tuesday, September 13, 2022
    Profile: https://www.blogger.com/profile/16199607135379820616
    klo cma ngambil sinopsis gimna ya, ap lewat item.content
  • DONGHUA DESU
    Wednesday, July 12, 2023
    Profile: https://www.blogger.com/profile/03031410995341365495
    bg, bagi template yg player streaming dong bg
  • Pira TV
    Wednesday, July 12, 2023
    Profile: https://www.blogger.com/profile/04592905453554276619
    Saya menyukai skripnya, saya pembuat aplikasi untuk Android tetapi saya sangat menyukai blogger, saya sangat menyukai skripnya, saya bahkan dapat menemukan beberapa hal di aplikasi menggunakan blogger dengan skrip ini. Waktu banget 😁
  • Xenoicy
    Saturday, June 29, 2024
    Profile: https://www.blogger.com/profile/07123898444593098130
    Pak bisa bantu ini contoh feed post yang kugunakan.
    <script>
    let postSitemapMajuArr,createNavigation,navigationElement,postSitemap=new GojoSitemap({firstContent:!0}),sitemapElement=document.getElementById("sitemap_navigation"),customPostElement=document.getElementById("boxseries"),searchParams=new URLSearchParams(document.location.search),maxResults=searchParams.get("max-results")||7;postSitemap.run("https://www.shiroyuki.asia/feeds/posts/default/-/Anime",(t,e,a,n)=>{if(1==e&&0!=t.length){let e=t.slice(0,maxResults);GojoHtml.boxseries(e,customPostElement),createNavigation=new Maju({callback:function(t,e){""!=t.innerHTML&&(postSitemapMajuArr||1==e?(navigationElement&&"mainElement"in navigationElement&&navigationElement.mainElement.remove(),navigationElement={mainElement:t,currentPage:e},sitemapElement.appendChild(t),postSitemapMajuArr&&GojoHtml.boxseries(postSitemapMajuArr[e-1].items,customPostElement)):alert("Error: Sitemap Belum selesai dibuat."))}}),createNavigation.arrayToPage(n,maxResults,!0)}a&&(postSitemapMajuArr=createNavigation.arrayToPage(t,maxResults))},!1);
    </script>

    Cara agar memanggil sinopsis yang di target tampil di homepage gimana ya pak?
    • Xenoicy
      Saturday, June 29, 2024
      Profil: https://www.blogger.com/profile/07123898444593098130
      Sorry ini yang bener
      <script>
      (function(i, s) {
      let t = s.GojoHtml || {};
      "boxseries" in t ||
      (t.boxseries = function(posts, container) {
      let htmlContent = "",
      statusTypes = ["Completed", "Ongoing"],
      episodeTypes = ["Eps. TV", "Eps. Movie", "Eps. Special"],
      ratingPattern = /^(\d{1,3}\.\d{1,2})$/,
      episodePattern = /((chapter|episode|ep|ch|vol|volume|bab)(\.\s|\s|\.)(\d{1,4})(\.\d{1,2})?)/gi;

      for (let i = 0; i < posts.length; i++) {
      let post = posts[i],
      imageUrl = GojoScript.prototype.resizeImage(
      post.image,
      "w2045-h1155-c-rw"
      ),
      status,
      rating,
      episodeType,
      episodeNumber,
      author = post.author,
      updatedDate = post.updatedDate;

      post.label.forEach((label) => {
      if (!status && statusTypes.includes(label)) status = label;
      if (!rating && ratingPattern.test(label)) rating = label;
      if (!episodeType && episodeTypes.includes(label))
      episodeType = label;
      if (!episodeNumber && episodePattern.test(label))
      episodeNumber = label;
      });

      if (!episodeNumber && post.title.match(episodePattern)) {
      episodeNumber = post.title
      .match(episodePattern)[0]
      .replace(
      /((chapter|episode|ep|ch|vol|volume|bab)(\.\s|\s|\.))/gi,
      "Eps. "
      );
      }

      htmlContent +=

      <div class="main_menu"><div class="p_s2">

      <a href='${post.link}' title='${
      post.title
      }'>${post.title}</a></div>
      </h3>
      <div class='cp1_limit'>
      <div class='cp1_ply'></div>;

      htmlContent += <img loading='lazy' src='${imageUrl}' height='145' width='53'>
      </div>
      <div class='cp1_bigor'>
      <div class='cp1_adds'>
      ---------------<br>di update oleh <a href="/p/profile-publik.html?users=RrAZ05YevpSOD3jjjmsL9k8jPAa2">Xenoicy</a> pada ${post.date}<br><div class='cp1_post_info'>
      </div> </div>
      </div>;

      if (rating) {
      htmlContent += <div class='cp1_rt'>
      <div class='cp1_rating'>
      <div class='cp1_rating-prc'>
      <div class='cp1_rtp'>
      <div class='cp1_rtb'>
      <span style='width:${rating
      .replace(/./g, "")
      .slice(0, 2)}%;'></span>
      </div>
      </div>
      </div>
      <div class='cp1_numscore'>${rating}</div>
      </div>
      </div>;
      }

      htmlContent += </div>
      </div>
      </div>;
      }

      if (container) {
      container.innerHTML = htmlContent;
      }
      return htmlContent;
      }),
      (s.GojoHtml = t);
      })(document, window);
      </script>
    • Dayat
      Sunday, June 30, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      coba kaya gini.
      (function(i, s) {
      let t = s.GojoHtml || {};
      "boxseries" in t ||
      (t.boxseries = function(posts, container) {
      let htmlContent = "",
      statusTypes = ["Completed", "Ongoing"],
      episodeTypes = ["Eps. TV", "Eps. Movie", "Eps. Special"],
      ratingPattern = /^(\d{1,3}\.\d{1,2})$/,
      episodePattern = /((chapter|episode|ep|ch|vol|volume|bab)(\.\s|\s|\.)(\d{1,4})(\.\d{1,2})?)/gi;

      for (let i = 0; i < posts.length; i++) {
      let post = posts[i],
      synopsis = 'default' in post ? post.default : 'summary' in post ? post.summary : 'Tidak ada Synopsis',
      div = i.createElement('div');

      div.innerHTML = synopsis;

      let elementSynopsis = div.querySelector('#synopsis');

      htmlContent += elementSynopsis ? elementSynopsis.innerText : div.innerText;

      if (container) {
      container.innerHTML = htmlContent;
      }
      return htmlContent;
      }),
      (s.GojoHtml = t);
      })(document, window);
    • Xenoicy
      Sunday, June 30, 2024
      Profil: https://www.blogger.com/profile/07123898444593098130
      Pemasangannya gimana pak? , coba kirim full nya sama yang ane send
    • Dayat
      Monday, July 01, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      gini contoh ny.
      https://codepen.io/siwaluh/pen/bGyPJmo
    • Baca komik
      Thursday, July 04, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Min saya mau nanya, kan di blogerscript terbaru kamu ada fungsi
      {return Math.floor(Math.random()*(t-e))+e}sort(e,t){if("Update"==t||"Added"==t){let r="Update"==t?"updated":"published";e=e.sort(function(e,t){return e[r]<t[r]?-1:e[r]>t[r]?1:0}).reverse()}else"A-Z"!=t&&"Z-A"!=t||(e=e.sort((e,t)=>e.title.localeCompare(t.title,void 0,{numeric:!0})),"Z-A"==t&&(e=e.reverse()));return e}xhr(e,t=this.err)

      misalkan saya mau ambil fungsi A-Z untuk titlenya cara gunainya gimana di script htmlnya, terus untuk label di pasang apa,
    • Dayat
      Thursday, July 04, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      Contoh penggunaan nya:
      https://codepen.io/siwaluh/pen/OJeLyoG
    • Baca komik
      Friday, July 05, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Min kalo yg untuk label A-Z/Z-A gimana contohnya? Kan kalo itu yg seriesnya, terus knapa di saya pas coba di web saya pake host:Test.bloger.com malah gagal scriptnya min
    • Dayat
      Friday, July 05, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      gini jadi nya klo di balik Z-A.
      let x = new BloggerSitemap({
      'host': 'komikav-clone.blogspot.com',
      'label': 'Series'
      });

      x.run(e => {
      let items = x.alphaSort(e.posts),
      html = '';
      items.reverse().forEach(items => {
      html += '<h2>' + items.id + '</h2>';
      items.items.forEach(item => {
      html += '<p>' + item.title + '</p>';
      })
      });
      document.getElementById('ex').innerHTML = html;
      });
    • Dayat
      Friday, July 05, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      klo web nya sama dengan yang ada discript, host nya di hapus aja.
      let x = new BloggerSitemap({
      'label': 'Series'
      });
    • Baca komik
      Saturday, July 06, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Sudah bisa min, cuman beda bloggerscriptnya saja terimakasih min, min itu fungsi A-Z/Z-A kalo digunakan untuk nextandprev sitemap, seperti script komen yg diatas ini, yg perlu di rubah itu apa nya min, mau saya taruh di search/label/A-Z/Z-A
    • Baca komik
      Sunday, July 07, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Min saya sudah bisa untuk yg A-Z nya, cuman supaya ke Z-A gimana min? Terus bedanya update sama added itu apa?
      https://codepen.io/ulbyokmr-the-animator/pen/dyByPyK
    • Dayat
      Sunday, July 07, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      gini.
      https://codepen.io/siwaluh/pen/JjQjoRL
      Update = di urutkan dari postingan yg lama tapi baru baru ini di update (di ubah).
      Added = di urutkan dari postingan yang baru di tambahkan.
    • Baca komik
      Sunday, July 07, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Perlu label tidak min supaya berfungsi orderd by Added/A-Z/Z-A/Update nya
    • Dayat
      Sunday, July 07, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      terserah, pakai label atau tidak.
    • Baca komik
      Tuesday, July 09, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Min bisa ga buatin next and prev pada post script ini contoh 1 page, 5 post page
      https://codepen.io/ulbyokmr-the-animator/pen/WNqNmgm
    • Dayat
      Tuesday, July 09, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      Begini.
      https://codepen.io/siwaluh/pen/XWLWvmN
      Source Pagination js.
      https://cdn.jsdelivr.net/gh/siwaluh/Pagination@main/assets/js/pagination.min.js
    • Baca komik
      Tuesday, July 09, 2024
      Profil: https://www.blogger.com/profile/05583155505950172982
      Ok makasih min, min kalo yg ini gimana caranya supaya ada number di tengah² next/prevnya, saya pake bloggerscript yg pertama
      https://codepen.io/ulbyokmr-the-animator/pen/KKjwKVG
    • Dayat
      Wednesday, July 10, 2024
      Profil: https://www.blogger.com/profile/02480525259652322034
      belum bisa bantu, klo pakai yg v3 bisa aja,