mirror of
https://github.com/RPCSX/RPCSX.github.io.git
synced 2026-01-31 01:05:21 +01:00
Request number of contributors from GH API
This commit is contained in:
@@ -67,7 +67,9 @@ const darkThemeOverrides: GlobalThemeOverrides = {
|
||||
<div class="columns">
|
||||
<div id="main-column" class="column">
|
||||
<div class="top-main">
|
||||
<Hook :themex="theme"/>
|
||||
<Suspense>
|
||||
<Hook :themex="theme"/>
|
||||
</Suspense>
|
||||
</div>
|
||||
|
||||
<div class="column-content">
|
||||
|
||||
@@ -11,11 +11,9 @@ function getTime() {
|
||||
return months > 12 ? (time_result[0] + Math.round(time_result[1] / 12 * 10) / 10) + " years" : months + "months";
|
||||
}
|
||||
|
||||
var contributors = 10; // TODO web scraping
|
||||
// const response = await fetch("https://cors-anywhere.herokuapp.com/https://github.com/RPCSX/rpcsx/");
|
||||
// contributors = await cheerio.load(response.text())('.Counter m1-1');
|
||||
// console.log("hi");
|
||||
|
||||
const response = await fetch('https://api.github.com/repos/rpcsx/rpcsx/contributors?per_page=1')
|
||||
const headers = response.headers
|
||||
var contributors = headers.get('link')?.match(/&page=(\d+)>; rel="last"/)[1]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user