Skip to content

Commit

Permalink
Update mrchllaja-addon.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrchlldev authored Jul 7, 2024
1 parent ac654f2 commit 04e0747
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mrchllaja-addon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Random Post */
function showLucky(e){var t=e.feed;t.entry;for(var a=t.entry[0],n=0;n<a.link.length;++n)"alternate"==a.link[n].rel&&(window.location=a.link[n].href)}function fetchLuck(e){(script=document.createElement("script")).src="/feeds/posts/summary?start-index="+e+"&max-results=1&alt=json-in-script&callback=showLucky",script.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(script)}function readLucky(e){var t=Math.floor(Math.random()*parseInt(e.feed.openSearch$totalResults.$t,10));fetchLuck(++t)}function feelingLucky(){document.getElementById('toastNotif').innerHTML = '<span><i class="fa-solid fa-rotate-right fa-spin" style="margin-right:8px"></i>Memuat Postingan Acak, Harap tunggu...</span>';var e=document.createElement("script");e.type="text/javascript",e.src="/feeds/posts/summary?max-results=0&alt=json-in-script&callback=readLucky",document.getElementsByTagName("head")[0].appendChild(e)}

/* Widget Slider */
const wcSliderRandom = {
feeds: 'https://mrchllaja.blogspot.com',
Expand All @@ -13,5 +14,6 @@ const wcSliderRandom = {
sharedBy: 'www.wendycode.com' // credit do not removed
};
function sliderLoad(){var script=document.createElement('script');script.async= true;script.src='https://cdn.wendycode.com/blogger/widget/slider-random-post.js';document.body.appendChild(script)}function sldDtcLazy(){sliderLoad(),localStorage.setItem("sliderJs","true")}var wcLdStorage=localStorage.getItem("sliderJs");if("true"!=wcLdStorage){var t=!1,e=!1;window.addEventListener("scroll",()=>{(0!=document.documentElement.scrollTop&&!1===t||0!=document.body.scrollTop&&!1===t)&&(sldDtcLazy(),t=!0,e=!0)},!0),window.addEventListener("click",()=>{!1===e&&!1===e&&(sldDtcLazy(),e=!0,t=!0)},!0)}"true"===wcLdStorage&&sliderLoad();

/* Script Menghapus Kode ?m=1 / ?m=0 */
var uri = window.location.toString(); if (uri.indexOf("?m=1","?m=1") > 0) {var clean_uri = uri.substring(0, uri.indexOf("?m=1"));window.history.replaceState({}, document.title, clean_uri); };

0 comments on commit 04e0747

Please sign in to comment.