fixed github action bug

This commit is contained in:
Nuno Coração
2022-10-01 00:11:34 +01:00
parent bd96cb3bb9
commit 4c53d04f65
326 changed files with 3 additions and 15162 deletions

View File

@@ -1 +0,0 @@
const sitePreference=document.documentElement.getAttribute("data-default-appearance"),userPreference=localStorage.getItem("appearance");(sitePreference==="dark"&&userPreference===null||userPreference==="dark")&&document.documentElement.classList.add("dark"),document.documentElement.getAttribute("data-auto-appearance")==="true"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&userPreference!=="light"&&document.documentElement.classList.add("dark"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{e.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")})),window.addEventListener("DOMContentLoaded",n=>{const e=document.getElementById("appearance-switcher"),t=document.getElementById("appearance-switcher-mobile");e&&(e.addEventListener("click",()=>{document.documentElement.classList.toggle("dark"),localStorage.setItem("appearance",document.documentElement.classList.contains("dark")?"dark":"light")}),e.addEventListener("contextmenu",e=>{e.preventDefault(),localStorage.removeItem("appearance")})),t&&(t.addEventListener("click",()=>{document.documentElement.classList.toggle("dark"),localStorage.setItem("appearance",document.documentElement.classList.contains("dark")?"dark":"light")}),t.addEventListener("contextmenu",e=>{e.preventDefault(),localStorage.removeItem("appearance")}))})

View File

@@ -1 +0,0 @@
const sitePreference=document.documentElement.getAttribute("data-default-appearance"),userPreference=localStorage.getItem("appearance");(sitePreference==="dark"&&userPreference===null||userPreference==="dark")&&document.documentElement.classList.add("dark"),document.documentElement.getAttribute("data-auto-appearance")==="true"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&userPreference!=="light"&&document.documentElement.classList.add("dark"),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{e.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")})),window.addEventListener("DOMContentLoaded",e=>{const t=document.getElementById("appearance-switcher"),n=document.getElementById("appearance-switcher-mobile");t&&(t.addEventListener("click",()=>{document.documentElement.classList.toggle("dark"),localStorage.setItem("appearance",document.documentElement.classList.contains("dark")?"dark":"light")}),t.addEventListener("contextmenu",e=>{e.preventDefault(),localStorage.removeItem("appearance")})),n&&(n.addEventListener("click",()=>{document.documentElement.classList.toggle("dark"),localStorage.setItem("appearance",document.documentElement.classList.contains("dark")?"dark":"light")}),n.addEventListener("contextmenu",e=>{e.preventDefault(),localStorage.removeItem("appearance")}))})

View File

@@ -1 +0,0 @@
function switchHomeLayout(){const t=document.getElementById("page"),e=document.getElementById("profile"),n=document.querySelectorAll("code[id=layout]");e.style.display==="none"?(e.style.display="block",t.style.display="none",n.forEach(function(e){e.innerText="profile"})):(e.style.display="none",t.style.display="block",n.forEach(function(e){e.innerText="page"}))}window.addEventListener("DOMContentLoaded",e=>{document.querySelectorAll("#switch-layout-button").forEach(e=>e.addEventListener("click",function(e){e.preventDefault(),switchHomeLayout()}))})

View File

@@ -1 +0,0 @@
if(typeof auth!="undefined"){var viewsCollection=db.collection("views"),update_views,update_likes,likesCollection=db.collection("likes");function numberWithCommas(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}update_views=function(e,t){viewsCollection.doc(t).onSnapshot(t=>{var s,n=t.data();n&&(s=document.querySelectorAll("span[id='"+e+"']")[0].innerText.split(" ")[1],document.querySelectorAll("span[id='"+e+"']")[0].innerText=numberWithCommas(n.views)+" "+s)})},update_likes=function(e,t){likesCollection.doc(t).onSnapshot(t=>{var s,n=t.data();n&&(s=document.querySelectorAll("span[id='"+e+"']")[0].innerText.split(" ")[1],document.querySelectorAll("span[id='"+e+"']")[0].innerText=numberWithCommas(n.likes)+" "+s)})},auth.signInAnonymously().then(()=>{var e,t,n,s,o=document.querySelectorAll("span[id^='views_']");for(n in o)e=o[n].id,t=e&&e.replaceAll("/","-"),t&&update_views(e,t);s=document.querySelectorAll("span[id^='likes_']");for(n in s)e=s[n].id,t=e&&e.replaceAll("/","-"),t&&update_likes(e,t)}).catch(e=>{var t=e.code,n=e.message;console.error(t,n)})}

View File

@@ -1 +0,0 @@
if(typeof auth!='undefined'){var viewsCollection=db.collection('views'),update_views;function numberWithCommas(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,',')}update_views=function(e,t){viewsCollection.doc(t).onSnapshot(s=>{var n,t=s.data();t&&(n=document.querySelectorAll("span[id='"+e+"']")[0].innerText.split(' ')[1],document.querySelectorAll("span[id='"+e+"']")[0].innerText=numberWithCommas(t.views)+" "+n)})},auth.signInAnonymously().then(()=>{var e,t,s,n=document.querySelectorAll("span[id^='views_']");for(s in n)e=n[s].id,t=e&&e.replaceAll("/","-"),t&&update_views(e,t)}).catch(e=>{var t=e.code,n=e.message;console.error(t,n)})}

View File

@@ -1 +0,0 @@
if(typeof auth!="undefined"){var viewsCollection=db.collection("views"),update_views;function numberWithCommas(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}update_views=function(e,t){viewsCollection.doc(t).onSnapshot(t=>{var s,n=t.data();n&&(s=document.querySelectorAll("span[id='"+e+"']")[0].innerText.split(" ")[1],document.querySelectorAll("span[id='"+e+"']")[0].innerText=numberWithCommas(n.views)+" "+s)})},auth.signInAnonymously().then(()=>{var e,t,s,n=document.querySelectorAll("span[id^='views_']");for(s in n)e=n[s].id,t=e&&e.replaceAll("/","-"),t&&update_views(e,t)}).catch(e=>{var t=e.code,n=e.message;console.error(t,n)})}

1
docs/js/zoom.min.js vendored

File diff suppressed because one or more lines are too long