Merge pull request #233 from teaxyz/stats-load-speed

Stats Load Speed
This commit is contained in:
Chris Waters 2022-12-16 15:50:33 -05:00 committed by GitHub
commit 94467e8885
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 25 deletions

View file

@ -0,0 +1,24 @@
<script>
try {
fetch('https://app.tea.xyz/api/signups')
.then(res => res.json())
.then(res => {
const signups = res.signups ? res.signups.toLocaleString() : ""
if (!(localStorage['signup'] || '').match(/:::/)) {
$('#count').html(signups)
}
$('#count1').html(signups)
$('#count2').html(signups)
$('#count3').html(signups)
$('#count4').html(signups)
$('#count5').html(signups)
$('#count6').html(signups)
$('#count7').html(signups)
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "")
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
})
} catch (e) {
console.error(e)
}
</script>

View file

@ -73,31 +73,6 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
} }
</script> </script>
<script>
try {
fetch('https://app.tea.xyz/api/signups')
.then(res => res.json())
.then(res => {
const signups = res.signups ? res.signups.toLocaleString() : ""
if (!(localStorage['signup'] || '').match(/:::/)) {
$('#count').html(signups)
}
$('#count1').html(signups)
$('#count2').html(signups)
$('#count3').html(signups)
$('#count4').html(signups)
$('#count5').html(signups)
$('#count6').html(signups)
$('#count7').html(signups)
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "")
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
})
} catch (e) {
console.error(e)
}
</script>
<script type="text/javascript"> <script type="text/javascript">
(function(c,l,a,r,i,t,y){ (function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};

View file

@ -105,6 +105,8 @@
} }
</script> </script>
{{- partial "auth-data-snippet.html" -}}
{{- partial "floating-join-btn.html" . -}} {{- partial "floating-join-btn.html" . -}}
{{- partial "toast.html" -}} {{- partial "toast.html" -}}