mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-06 06:20:30 +02:00
fixes
This commit is contained in:
parent
537161e621
commit
13de9931b0
3 changed files with 23 additions and 9 deletions
|
@ -43,7 +43,8 @@ strong {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.time {
|
||||
.time,
|
||||
.weather {
|
||||
font-size: 18px;
|
||||
margin-bottom: 10px;
|
||||
color: #cccccc;
|
||||
|
@ -560,7 +561,7 @@ div[class="cards sitemap shadow"] > h4 {
|
|||
|
||||
.banan {
|
||||
position: fixed;
|
||||
left: 30px !important;
|
||||
right: 30px !important;
|
||||
bottom: 30px !important;
|
||||
width: 64px;
|
||||
cursor: pointer;
|
||||
|
|
|
@ -43,6 +43,7 @@ function lan() {
|
|||
}).then(data => {
|
||||
const statusElem = document.getElementById('status');
|
||||
const pfpElem = document.getElementById('profile-picture');
|
||||
const activity = document.querySelector('.activity');
|
||||
const activityNameElem = document.getElementById('activity-name');
|
||||
const activityImageElem = document.getElementById('activity-image');
|
||||
|
||||
|
@ -73,10 +74,7 @@ function lan() {
|
|||
} else {
|
||||
activityImageElem.style.display = "none";
|
||||
}
|
||||
} else {
|
||||
activityNameElem.innerHTML = "<strong>Playing</strong> No Game Activity";
|
||||
activityImageElem.style.display = "none";
|
||||
}
|
||||
} else activity.style.display = "none";
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -213,7 +211,6 @@ function fetchSong() {
|
|||
fetch(url)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
const track = data?.recenttracks?.track?.[0];
|
||||
if (!track) return;
|
||||
const artist = track.artist["#text"];
|
||||
|
@ -230,6 +227,22 @@ function fetchSong() {
|
|||
});
|
||||
}
|
||||
|
||||
function fetchWeather(location) {
|
||||
if (!location) {
|
||||
fetch(`https://wttr.in/muc?format=%t | %C`)
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
document.getElementById('weather').innerText = data;
|
||||
})
|
||||
} else {
|
||||
fetch(`https://wttr.in/${location}?format=%t | %C`)
|
||||
.then(data => {
|
||||
document.getElementById('weather').innerText = data;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fetchWeather();
|
||||
fetchSong();
|
||||
|
||||
setInterval(() => {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
id="profile-picture"
|
||||
/>
|
||||
<h1 class="name tooltip" data-tooltip="zyqunix / Fabio / Laetitia / fentboiswag / монгол / 192.168.2.217">zyqunix</h1>
|
||||
<div class="time tooltip" id="time"> </div>
|
||||
<div class="age tooltip" id="age" data-tooltip="December 13th"></div>
|
||||
<span><div class="time tooltip" id="time"></div><div class="weather" id="weather"></div></span></span>
|
||||
<div class="age" id="age"></div>
|
||||
<div class="hobbies">
|
||||
Coding, Listening to Music, Reverse Engineering, Playing Counter-Strike
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue