.
This commit is contained in:
@@ -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
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
22
assets/js/pupil.js
Normal 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();
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user