mirror of
https://github.com/catmpeg/catmpeg.github.io.git
synced 2026-02-20 15:50:57 +03:00
ballix -> biancarosa.com.br
This commit is contained in:
parent
8244c77758
commit
3d5c1fd149
1 changed files with 2 additions and 3 deletions
|
|
@ -32,18 +32,17 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- <script>let u='catmpeg',s=document.querySelector('#song');fetch('https://lastfm-last-played.biancarosa.com.br/'+u+'/latest-song').then(r=>r.json()).then(j=>s.innerHTML=`<a href="https://www.last.fm/music/${encodeURIComponent(j.track.artist['#text']).replace(/%20/g,'+')}/_/${encodeURIComponent(j.track.name).replace(/%20/g,'+')}" target="_blank">${j.track.name} - ${j.track.artist['#text']}</a>`);</script> -->
|
<!-- <script>let u='catmpeg',s=document.querySelector('#song');fetch('https://lastfm-last-played.biancarosa.com.br/'+u+'/latest-song').then(r=>r.json()).then(j=>s.innerHTML=`<a href="https://www.last.fm/music/${encodeURIComponent(j.track.artist['#text']).replace(/%20/g,'+')}/_/${encodeURIComponent(j.track.name).replace(/%20/g,'+')}" target="_blank">${j.track.name} - ${j.track.artist['#text']}</a>`);</script> -->
|
||||||
<script>
|
<script>
|
||||||
// коля блять хватит эту залупу юзать, я тебя за чатку выебу нахуй, я щас вены себе вскрою за такой код
|
|
||||||
const lastPlayedBlock = document.getElementById('last-played');
|
const lastPlayedBlock = document.getElementById('last-played');
|
||||||
|
|
||||||
let xmlHttp = new XMLHttpRequest();
|
let xmlHttp = new XMLHttpRequest();
|
||||||
xmlHttp.open("GET", "https://www.ballix.net/whatsplaying/?user=catmpeg", false);
|
xmlHttp.open("GET", "https://lastfm-last-played.biancarosa.com.br/catmpeg/latest-song", false);
|
||||||
xmlHttp.send(null);
|
xmlHttp.send(null);
|
||||||
|
|
||||||
if (xmlHttp.responseText != 0) {
|
if (xmlHttp.responseText != 0) {
|
||||||
const lastParse = JSON.parse(xmlHttp.responseText);
|
const lastParse = JSON.parse(xmlHttp.responseText);
|
||||||
|
|
||||||
const lastPlayed = document.querySelector("#song");
|
const lastPlayed = document.querySelector("#song");
|
||||||
lastPlayed.innerHTML = "<a target=\"blank_\" href=\"" + lastParse["url"] + "\">" + lastParse["name"] + " - " + lastParse["artist"] + "</a>";
|
lastPlayed.innerHTML = "<a target=\"blank_\" href=\"" + lastParse["track"]["url"] + "\">" + lastParse["track"]["name"] + " - " + lastParse["track"]["artist"]["#text"] + "</a>";
|
||||||
|
|
||||||
lastPlayedBlock.style.display = "block";
|
lastPlayedBlock.style.display = "block";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue