mirror of
https://github.com/catmpeg/catmpeg.github.io.git
synced 2026-02-20 15:50:57 +03:00
ааа ето что
This commit is contained in:
parent
2d5fc8d406
commit
c8126250c8
2 changed files with 20 additions and 16 deletions
|
|
@ -1,13 +1,15 @@
|
|||
const lastPlayedBlock = document.getElementById('last-played');
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const lastPlayedBlock = document.getElementById('last-played');
|
||||
|
||||
fetch("https://lastfm-last-played.biancarosa.com.br/catmpeg/latest-song")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data != 0) {
|
||||
const lastPlayed = document.querySelector("#song");
|
||||
lastPlayed.innerHTML = `<a target="_blank" href="${data.track.url}">
|
||||
${data.track.name} - ${data.track.artist["#text"]}</a>`;
|
||||
lastPlayedBlock.style.display = "block";
|
||||
}
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
fetch("https://lastfm-last-played.biancarosa.com.br/catmpeg/latest-song")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data != 0) {
|
||||
const lastPlayed = document.getElementById("song");
|
||||
lastPlayed.innerHTML = `<a target="_blank" href="${data.track.url}">
|
||||
${data.track.name} - ${data.track.artist["#text"]}</a>`;
|
||||
lastPlayedBlock.style.display = "block";
|
||||
}
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
});
|
||||
10
index.html
10
index.html
|
|
@ -6,6 +6,8 @@
|
|||
<meta name="description" content="catmpeg page">
|
||||
<title>catmpeg page</title>
|
||||
<link rel="icon" href="assets/favicon.png">
|
||||
<link rel="preconnect" href="https://lastfm-last-played.biancarosa.com.br" crossorigin>
|
||||
<link rel="preload" href="assets/ConsolasBold.otf" as="font" type="font/otf" crossorigin>
|
||||
<link rel="stylesheet" href="assets/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -30,9 +32,9 @@
|
|||
<a href="//cat.tolya1337.ru"><img src="catmpeg88.png" alt="catmpeg"></a>
|
||||
<div id="last-played" style="display: none">
|
||||
<h2>Latest played song:</h2>
|
||||
<h3 id="song"></h3>
|
||||
<h3 id="song">~~~~ - ~~~~</h3>
|
||||
</div>
|
||||
<script src="assets/lastplayed.js"></script>
|
||||
<script src="assets/lastplayed.js" defer></script>
|
||||
</main>
|
||||
<div class="down">
|
||||
<h3><a href="//retro.cat.tolya1337.ru">> retro page <</a></h3>
|
||||
|
|
@ -41,8 +43,8 @@
|
|||
<a href="//otomir23.me/webring" target="_blank">webring</a>
|
||||
<a href="//otomir23.me/webring/catmpeg/next">next></a>
|
||||
</h3><br>
|
||||
<a href="//tolya1337.ru" target="_blank" style="image-rendering:pixelated"><img src="//tolya1337.ru/img/88x31.png" alt="tolya1337"></a>
|
||||
<a href="https://otomir23.me/" target="_blank" style="image-rendering:pixelated"><img src="https://otomir23.me/88x31.png" alt="otomir23"></a>
|
||||
<a href="//tolya1337.ru" target="_blank" style="image-rendering:pixelated"><img src="//tolya1337.ru/img/88x31.png" height="31" width="88" alt="tolya1337"></a>
|
||||
<a href="https://otomir23.me/" target="_blank" style="image-rendering:pixelated"><img src="https://otomir23.me/88x31.png" height="31" width="88" alt="otomir23"></a>
|
||||
<a href="//code.visualstudio.com" target="_blank" style="image-rendering:pixelated"><img src="assets/images/vscbutton.gif" height="31" width="88" alt="VSCode"></a>
|
||||
<a href="//xfree86.org" target="_blank" style="image-rendering:pixelated"><img src="assets/images/xfree.gif" height="31" width="88" alt="XFree86"></a>
|
||||
<a href="//archlinux.org" target="_blank" style="image-rendering:pixelated"><img src="assets/images/archlinux.gif" height="31" width="88" alt="Arch Linux"></a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue