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;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time,
|
||||||
|
.weather {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
|
@ -560,7 +561,7 @@ div[class="cards sitemap shadow"] > h4 {
|
||||||
|
|
||||||
.banan {
|
.banan {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 30px !important;
|
right: 30px !important;
|
||||||
bottom: 30px !important;
|
bottom: 30px !important;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -43,6 +43,7 @@ function lan() {
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
const statusElem = document.getElementById('status');
|
const statusElem = document.getElementById('status');
|
||||||
const pfpElem = document.getElementById('profile-picture');
|
const pfpElem = document.getElementById('profile-picture');
|
||||||
|
const activity = document.querySelector('.activity');
|
||||||
const activityNameElem = document.getElementById('activity-name');
|
const activityNameElem = document.getElementById('activity-name');
|
||||||
const activityImageElem = document.getElementById('activity-image');
|
const activityImageElem = document.getElementById('activity-image');
|
||||||
|
|
||||||
|
@ -73,10 +74,7 @@ function lan() {
|
||||||
} else {
|
} else {
|
||||||
activityImageElem.style.display = "none";
|
activityImageElem.style.display = "none";
|
||||||
}
|
}
|
||||||
} else {
|
} else activity.style.display = "none";
|
||||||
activityNameElem.innerHTML = "<strong>Playing</strong> No Game Activity";
|
|
||||||
activityImageElem.style.display = "none";
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +211,6 @@ function fetchSong() {
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log(data);
|
|
||||||
const track = data?.recenttracks?.track?.[0];
|
const track = data?.recenttracks?.track?.[0];
|
||||||
if (!track) return;
|
if (!track) return;
|
||||||
const artist = track.artist["#text"];
|
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();
|
fetchSong();
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
id="profile-picture"
|
id="profile-picture"
|
||||||
/>
|
/>
|
||||||
<h1 class="name tooltip" data-tooltip="zyqunix / Fabio / Laetitia / fentboiswag / монгол / 192.168.2.217">zyqunix</h1>
|
<h1 class="name tooltip" data-tooltip="zyqunix / Fabio / Laetitia / fentboiswag / монгол / 192.168.2.217">zyqunix</h1>
|
||||||
<div class="time tooltip" id="time"> </div>
|
<span><div class="time tooltip" id="time"></div><div class="weather" id="weather"></div></span></span>
|
||||||
<div class="age tooltip" id="age" data-tooltip="December 13th"></div>
|
<div class="age" id="age"></div>
|
||||||
<div class="hobbies">
|
<div class="hobbies">
|
||||||
Coding, Listening to Music, Reverse Engineering, Playing Counter-Strike
|
Coding, Listening to Music, Reverse Engineering, Playing Counter-Strike
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue