1
0
mirror of https://gitlab.com/2-chainz/2-chainz-rest-site.git synced 2025-07-26 08:01:25 +00:00

basically copy paste from kanye.rest

This commit is contained in:
2020-03-04 19:01:53 -07:00
commit d45f8fe123
35 changed files with 1745 additions and 0 deletions

16
js/index.js Normal file
View File

@@ -0,0 +1,16 @@
getQuote();
function getQuote() {
fetch("https://api.chainz.rest")
.then(resp => resp.json())
.then(function(data) {
document.getElementById("quote").innerHTML = data.quote;
const tweet = encodeURIComponent(
`"${data.quote}"-@2chainz via https://api.chainz.rest @ajzbc`
);
document.getElementById(
"tweet"
).href = `https://twitter.com/intent/tweet?text=${tweet}`;
});
}