mirror of
https://github.com/ivabus/www
synced 2024-11-10 05:35:14 +03:00
Merge pull request #226 from teaxyz/api-repos-maintainers
fetch stats from server
This commit is contained in:
commit
31e6cdf1d2
|
@ -12,7 +12,7 @@ exclude = [
|
||||||
"https://www.clarity.ms/tag/",
|
"https://www.clarity.ms/tag/",
|
||||||
"https://www.googletagmanager.com/gtm.js",
|
"https://www.googletagmanager.com/gtm.js",
|
||||||
".*/mailto:.*@.*",
|
".*/mailto:.*@.*",
|
||||||
"https://tea.xyz/tea.white-paper",
|
"https://tea.xyz/tea.white-paper", # fragment used in js
|
||||||
"https://tea.xyz/tea.products",
|
"https://tea.xyz/tea.products",
|
||||||
"https://tea.xyz/tea.nebraska-man",
|
"https://tea.xyz/tea.nebraska-man",
|
||||||
"https://tea.xyz/tea.cli",
|
"https://tea.xyz/tea.cli",
|
||||||
|
@ -26,5 +26,6 @@ exclude = [
|
||||||
"https://openssl.org/",
|
"https://openssl.org/",
|
||||||
"https://twitter.com/teaxyz_",
|
"https://twitter.com/teaxyz_",
|
||||||
"file:///home/runner/work/www/www/public/+github.com/rhash/RHash",
|
"file:///home/runner/work/www/www/public/+github.com/rhash/RHash",
|
||||||
"file:///home/runner/work/www/www/public/+github.com/rhash/RHash"
|
"file:///home/runner/work/www/www/public/+github.com/rhash/RHash",
|
||||||
|
"https://app.tea.xyz/api/signups", # can take a little too long, and no reason to hammer here.
|
||||||
]
|
]
|
||||||
|
|
|
@ -89,6 +89,8 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
||||||
$('#count5').html(signups)
|
$('#count5').html(signups)
|
||||||
$('#count6').html(signups)
|
$('#count6').html(signups)
|
||||||
$('#count7').html(signups)
|
$('#count7').html(signups)
|
||||||
|
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
|
||||||
|
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
@ -192,17 +194,3 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
fetch('stats.json')
|
|
||||||
.then(res => res.json())
|
|
||||||
.then((out) => {
|
|
||||||
//Debugging + Reference
|
|
||||||
console.log(out);
|
|
||||||
document.getElementById('stat-one').innerHTML = out[0].num_repos;
|
|
||||||
document.getElementById('stat-two').innerHTML = out[0].num_maintainers;
|
|
||||||
})
|
|
||||||
.catch(err => { throw err });
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
Loading…
Reference in a new issue