This commit is contained in:
Pupil
2020-02-04 14:47:54 +09:00
parent b7c6735975
commit 95922b1fce
5 changed files with 63 additions and 10 deletions

View File

@@ -10,6 +10,21 @@ img + br + em {
}
.center {
display: block;
margin: auto;
display: block;
margin: auto;
}
.wrap {
display: flex;
justify-content: center;
align-items: center;
}
.wrap > * {
margin: 0 1rem;
}
.fab, .fas {
font-size: 32px;
color: white;
}

BIN
assets/images/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

22
assets/js/pupil.js Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
const LATEST_URL = "https://api.github.com/repos/tom5079/Pupil/releases/latest";
function getLatestRelease() {
return new Promise(function(resolve, reject) {
const xhr = new XMLHttpRequest();
xhr.open("GET", LATEST_URL)
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
resolve(JSON.parse(xhr.responseText))
} else {
reject(new Error('XHR failed on getLAtestRelease() with status ' + xhr.status))
}
}
};
xhr.send();
})
}