diff --git a/public/instant-opinion.min.js b/public/instant-opinion.min.js index c1932b9..31e49d3 100644 --- a/public/instant-opinion.min.js +++ b/public/instant-opinion.min.js @@ -1 +1 @@ -!async function(){const n="https://instant-opinion.dbuidl.com/votes/"+window.location.hostname,i=(t=".instant-opinion",document.querySelectorAll(t));var t;const o='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',e='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';async function s(n,i="GET"){try{const t=await fetch(n,{method:i});return await t.json()}catch(n){return!1}}async function c(i,t,o){const e=await s(`${n}/${i}`,"POST");e&&"percent"in e&&(t.querySelector(".instant-opinion-percent").innerText=e.percent+"%",o.style.width=e.percent+"%")}async function a(){const i=await s(`${n}`);return!(!i||!("percent"in i))&&i.percent}for(let n=0;n"+(!1!==h?"

"+h+"%

":"

50%

")+"";const m=s.querySelector(".instant-opinion-progress-progress");m.style.width=(!1===h?"50":h)+"%";const w=document.createElement("div");w.classList.add("instant-opinion-thumbs"),s.appendChild(w),w.appendChild(l),w.appendChild(d),setTimeout((()=>{t.classList.add("hide_kinda")}),2500);let g=!1,x=!1;function p(){g?r.classList.add("show_happy"):r.classList.remove("show_happy")}l.addEventListener("click",(async n=>(n.preventDefault(),n.stopPropagation(),g?(g=!1,l.innerHTML=o,p(),await c("0",t,m)):(g=!0,x=!1,l.innerHTML='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',d.innerHTML=e,p(),await c("1",t,m))))),d.addEventListener("click",(async n=>(n.preventDefault(),n.stopPropagation(),x?(x=!1,d.innerHTML=e,p(),await c("0",t,m)):(x=!0,g=!1,d.innerHTML='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',l.innerHTML=o,p(),await c("-1",t,m)))))}}(); \ No newline at end of file +!async function(){const n="https://instant-opinion.dbuidl.com/votes/"+window.location.hostname,i=(t=".instant-opinion",document.querySelectorAll(t));var t;const o='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',e='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';async function s(n,i="GET"){try{const t=await fetch(n,{method:i});return await t.json()}catch(n){return!1}}async function c(i,t,o){const e=await s(`${n}/${i}`,"POST");e&&"percent"in e&&(t.querySelector(".instant-opinion-percent").innerText=e.percent+"%",o.style.width=e.percent+"%")}async function a(){const i=await s(`${n}`);return!(!i||!("percent"in i))&&i.percent}for(let n=0;n"+(!1!==h?"

"+h+"%

":"

50%

")+"";const w=s.querySelector(".instant-opinion-progress-progress");w.style.width=(!1===h?"50":h)+"%";const m=document.createElement("div");m.classList.add("instant-opinion-thumbs"),s.appendChild(m),m.appendChild(l),m.appendChild(d),setTimeout((()=>{t.classList.add("hide_kinda")}),2500);let g=!1,x=!1;function p(){g?r.classList.add("show_happy"):r.classList.remove("show_happy")}l.addEventListener("click",(async n=>(n.preventDefault(),n.stopPropagation(),g?(g=!1,l.innerHTML=o,p(),await c("0",t,w)):(g=!0,x=!1,l.innerHTML='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',d.innerHTML=e,p(),await c("1",t,w))))),d.addEventListener("click",(async n=>(n.preventDefault(),n.stopPropagation(),x?(x=!1,d.innerHTML=e,p(),await c("0",t,w)):(x=!0,g=!1,d.innerHTML='\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e',l.innerHTML=o,p(),await c("-1",t,w)))))}}(); \ No newline at end of file