+ Activity: —
+Loading music data...
+diff --git a/assets/index-C6qE1llB.js b/assets/index-C6qE1llB.js new file mode 100644 index 0000000..d46baee --- /dev/null +++ b/assets/index-C6qE1llB.js @@ -0,0 +1,47 @@ +(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))d(t);new MutationObserver(t=>{for(const e of t)if(e.type==="childList")for(const s of e.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&d(s)}).observe(document,{childList:!0,subtree:!0});function i(t){const e={};return t.integrity&&(e.integrity=t.integrity),t.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?e.credentials="include":t.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function d(t){if(t.ep)return;t.ep=!0;const e=i(t);fetch(t.href,e)}})();function M(){const u=document.getElementById("favicon"),a="619810098465734666",i=document.getElementById("avatar"),d=document.getElementById("username"),t=document.getElementById("status-icon"),e=document.getElementById("status-text"),s=document.getElementById("activity"),$=document.querySelector(".user-card"),y=document.getElementById("music-container");let n=null;const C={online:"status-online",idle:"status-idle",dnd:"status-dnd",offline:"status-offline"},m=new WebSocket("wss://api.lanyard.rest/socket");m.onopen=()=>{m.send(JSON.stringify({op:2,d:{subscribe_to_ids:[a]}}))},m.onmessage=w=>{const c=JSON.parse(w.data);if(!c.t||!c.d)return;if(c.t==="INIT_STATE")n=c.d[a];else if(c.t==="PRESENCE_UPDATE")n=c.d;else return;if(!n||!n.discord_user){d.textContent="User data not found",t.className="status-icon",e.textContent="",s.textContent="No activity data available",i.src="https://cdn.discordapp.com/avatars/619810098465734666/0481ff1a167a987fa41790d3079ed7d7.webp?size=80",b();return}const p=n.discord_user;i.src=`https://cdn.discordapp.com/avatars/${p.id}/${p.avatar}.png`,u.href=`https://cdn.discordapp.com/avatars/${p.id}/${p.avatar}.png`,d.textContent=p.username;let h=n.discord_status||"offline";if(t.className="status-icon",C[h]?t.classList.add(C[h]):t.style.backgroundColor="gray",e.textContent=h.charAt(0).toUpperCase()+h.slice(1),n.activities&&n.activities.length>0){const r=n.activities.find(o=>o.name&&o.name!=="Custom Status");s.textContent=r?`Activity: ${r.name}`:"No activity data available."}else s.textContent="No activity data available.";let L=!1;if(n.activities&&n.activities.length>0){const r=n.activities.find(o=>o.type===2&&o.name==="Apple Music");if(r){const o=r.details,I=r.state;let f=I,l="";const E=I.split(" — ");E.length>=2&&(f=E[0],l=E.slice(1).join(" — "));let v="";if(r.assets&&r.assets.large_image){let g=r.assets.large_image;const T="/https/",k=g.indexOf(T);k!==-1?v="https://"+g.substring(k+T.length):g.startsWith("https://")?v=g:(console.warn("Could not find a valid HTTP(S) URL in large_image:",g),v="")}o&&f&&v?(y.innerHTML=`
Album art not available.
+Not listening to music right now.
")}},setInterval(()=>{m.readyState===WebSocket.OPEN&&m.send(JSON.stringify({op:3}))},3e4);function b(){const w=$.offsetHeight,c=Math.max(w-42.5,100);y.style.height=`${c}px`}window.addEventListener("resize",b),window.addEventListener("DOMContentLoaded",b)}function x(){const u=document.getElementById("youtube"),a=document.getElementById("twitter"),i=document.getElementById("mega");u.addEventListener("click",()=>{window.open("https://www.youtube.com/@opiategalore?sub_confirmation=1","_blank")}),a.addEventListener("click",()=>{window.open("https://twitter.com/ctgadse","_blank")}),i.addEventListener("click",()=>{window.open("https://mega.nz/folder/XCx22aYZ#IZykt57yG1StXceL8XqlUQ","_blank")})}function A(){document.addEventListener("DOMContentLoaded",()=>{const u="UCLOxpFqdyAab5eCWtHWZ-Zg",a="AIzaSyBt_Yeacmt8K41HZMXGF6K_isMv_eM14mg",i=document.getElementById("youtube-embed-container");if(!i){console.error("Container element not found.");return}const d=`https://www.googleapis.com/youtube/v3/search?key=${a}&channelId=${u}&part=snippet,id&order=date&maxResults=1&type=video`;fetch(d).then(t=>t.ok?t.json():t.json().then(e=>{throw new Error(`HTTP error! Status: ${t.status}, Message: ${e.error.message}`)})).then(t=>{if(t.items&&t.items.length>0){const e=t.items[0].id.videoId;if(e){const s=document.createElement("iframe");s.width="640px",s.height="360px",s.src=`https://www.youtube.com/embed/${e}?autoplay=0&controls=1&rel=0`,s.title="YouTube Video Player",s.frameBorder="0",s.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",s.allowFullscreen=!0,i.innerHTML="",i.appendChild(s)}else i.innerHTML="No video ID found for the latest upload.
"}else i.innerHTML="No videos found on this channel, or an issue occurred with the API response.
"}).catch(t=>{console.error("Error fetching YouTube video:",t),i.innerHTML=`Failed to load the latest video. Error: ${t.message}
`})})}document.querySelector("#app").innerHTML=` +
+ Activity: —
+Loading music data...
+Loading latest video...
+Album art not available.
+Not listening to music right now.
")}},setInterval(()=>{m.readyState===WebSocket.OPEN&&m.send(JSON.stringify({op:3}))},3e4);function b(){const w=$.offsetHeight,c=Math.max(w-42.5,100);y.style.height=`${c}px`}window.addEventListener("resize",b),window.addEventListener("DOMContentLoaded",b)}function x(){const u=document.getElementById("youtube"),a=document.getElementById("twitter"),i=document.getElementById("mega");u.addEventListener("click",()=>{window.open("https://www.youtube.com/@opiategalore?sub_confirmation=1","_blank")}),a.addEventListener("click",()=>{window.open("https://twitter.com/ctgadse","_blank")}),i.addEventListener("click",()=>{window.open("https://mega.nz/folder/XCx22aYZ#IZykt57yG1StXceL8XqlUQ","_blank")})}function A(){const u="UCLOxpFqdyAab5eCWtHWZ-Zg",a="AIzaSyBt_Yeacmt8K41HZMXGF6K_isMv_eM14mg",i=document.getElementById("youtube-embed-container");if(!i){console.error("Container element not found.");return}const d=`https://www.googleapis.com/youtube/v3/search?key=${a}&channelId=${u}&part=snippet,id&order=date&maxResults=1&type=video`;fetch(d).then(t=>t.ok?t.json():t.json().then(e=>{throw new Error(`HTTP error! Status: ${t.status}, Message: ${e.error.message}`)})).then(t=>{if(t.items&&t.items.length>0){const e=t.items[0].id.videoId;if(e){const s=document.createElement("iframe");s.width="640px",s.height="360px",s.src=`https://www.youtube.com/embed/${e}?autoplay=0&controls=1&rel=0`,s.title="YouTube Video Player",s.frameBorder="0",s.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",s.allowFullscreen=!0,i.innerHTML="",i.appendChild(s)}else i.innerHTML="No video ID found for the latest upload.
"}else i.innerHTML="No videos found on this channel, or an issue occurred with the API response.
"}).catch(t=>{console.error("Error fetching YouTube video:",t),i.innerHTML=`Failed to load the latest video. Error: ${t.message}
`})}document.querySelector("#app").innerHTML=` +
+ Activity: —
+Loading music data...
+Loading latest video...
+| Name | -Creation Date | -Download | -
|---|---|---|
| Down Bad | -16.06.2025 | -![]() |
-
| Don't Go There (Full) |
- 14.06.2025 | -![]() |
-
| Don't Go There (YT) |
- 14.06.2025 | -![]() |
-
| Wannabe | -07.06.2025 | -![]() |
-
| Reach | -05.06.2025 | -![]() |
-
| Tonight | -20.05.2025 | -![]() |
-
| For Real | -18.05.2025 | -![]() |
-
| Alone | -07.05.2025 | -![]() |
-
| Back In | -04.05.2025 | -![]() |
-
| All Of It | -04.05.2025 | -![]() |
-
- Activity: —
-Loading music data...
-Loading latest video...
-Album art not available.
-Not listening to music right now.
`; - } - } -}; - -setInterval(() => { - if (socket.readyState === WebSocket.OPEN) { - socket.send(JSON.stringify({ op: 3 })); - } -}, 30000); - -function adjustMusicContainerHeight() { - const userCardHeight = mainUserCard.offsetHeight; - const musicContainerHeight = Math.max(userCardHeight - 40, 100); // Ensure a minimum height of 100px - musicContainer.style.height = `${musicContainerHeight}px`; -} - -window.addEventListener("resize", adjustMusicContainerHeight); -window.addEventListener("DOMContentLoaded", adjustMusicContainerHeight); \ No newline at end of file diff --git a/js/links.js b/js/links.js deleted file mode 100644 index 81ef97f..0000000 --- a/js/links.js +++ /dev/null @@ -1,15 +0,0 @@ -const youtube = document.getElementById("youtube"); -const twitter = document.getElementById("twitter"); -const mega = document.getElementById("mega"); - -youtube.addEventListener("click", () => { - window.open("https://www.youtube.com/@opiategalore?sub_confirmation=1", "_blank"); -}); - -twitter.addEventListener("click", () => { - window.open("https://twitter.com/ctgadse", "_blank"); -}); - -mega.addEventListener("click", () => { - window.open("https://mega.nz/folder/XCx22aYZ#IZykt57yG1StXceL8XqlUQ", "_blank"); -}); \ No newline at end of file diff --git a/js/youtube-embed.js b/js/youtube-embed.js deleted file mode 100644 index 6690d9e..0000000 --- a/js/youtube-embed.js +++ /dev/null @@ -1,52 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - const youtubeChannelId = "UCLOxpFqdyAab5eCWtHWZ-Zg"; - const youtubeApiKey = "AIzaSyBt_Yeacmt8K41HZMXGF6K_isMv_eM14mg"; - - const container = document.getElementById("youtube-embed-container"); - - if (!container) { - console.error("Container element not found."); - return; - } - - const apiUrl = `https://www.googleapis.com/youtube/v3/search?key=${youtubeApiKey}&channelId=${youtubeChannelId}&part=snippet,id&order=date&maxResults=1&type=video`; - - fetch(apiUrl) - .then (response => { - if (!response.ok) { - return response.json().then(err => { - throw new Error(`HTTP error! Status: ${response.status}, Message: ${err.error.message}`); - }); - } - return response.json(); - }) - .then (data => { - if (data.items && data.items.length > 0) { - const videoId = data.items[0].id.videoId; - if (videoId) { - const iframe = document.createElement("iframe"); - iframe.className = "youtube-embed"; - iframe.width = "640px"; - iframe.height = "360px"; - iframe.src = `https://www.youtube.com/embed/${videoId}?autoplay=0&controls=1&rel=0`; - iframe.title = "YouTube Video Player"; - iframe.frameBorder = "0"; - iframe.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"; - iframe.allowFullscreen = true; - - container.innerHTML = ""; - container.appendChild(iframe); - } - else { - container.innerHTML = "No video ID found for the latest upload.
"; - } - } - else { - container.innerHTML = "No videos found on this channel, or an issue occurred with the API response.
"; - } - }) - .catch (error => { - console.error("Error fetching YouTube video:", error); - container.innerHTML = `Failed to load the latest video. Error: ${error.message}
` - }); -}); \ No newline at end of file diff --git a/img/mega.png b/mega.png similarity index 100% rename from img/mega.png rename to mega.png diff --git a/img/placeholder.png b/placeholder.png similarity index 100% rename from img/placeholder.png rename to placeholder.png diff --git a/styles/font/HelveticaNeueBold.otf b/styles/font/HelveticaNeueBold.otf deleted file mode 100644 index f44af64..0000000 Binary files a/styles/font/HelveticaNeueBold.otf and /dev/null differ diff --git a/styles/font/HelveticaNeueLight.otf b/styles/font/HelveticaNeueLight.otf deleted file mode 100644 index de55b68..0000000 Binary files a/styles/font/HelveticaNeueLight.otf and /dev/null differ diff --git a/styles/font/HelveticaNeueMedium.otf b/styles/font/HelveticaNeueMedium.otf deleted file mode 100644 index 1a2a9df..0000000 Binary files a/styles/font/HelveticaNeueMedium.otf and /dev/null differ diff --git a/styles/styles.css b/styles/styles.css deleted file mode 100644 index ae775c6..0000000 --- a/styles/styles.css +++ /dev/null @@ -1,232 +0,0 @@ -@font-face { - font-family: "HelveticaNeueLight"; - src: url(font/HelveticaNeueLight.otf); -} - -@font-face { - font-family: "HelveticaNeueMedium"; - src: url(font/HelveticaNeueMedium.otf); -} - -@font-face { - font-family: "HelveticaNeueBold"; - src: url(font/HelveticaNeueBold.otf); -} - -body { - font-family: "HelveticaNeueLight", sans-serif; - background-color: #9496A6; - display: flex; - justify-content: center; - align-items: center; - height: 100vh; - margin: 0; - flex-direction: column; -} - -.main-content-wrapper { - display: flex; - gap: 20px; - align-items: stretch; -} - -.user-card { - display: flex; - flex-direction: column; - align-items: center; - padding: 20px; - border-radius: 15px; - gap: 20px; - background-color: #F0F0F2; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.2)); - width: fit-content; -} - -.user-main-info { - display: flex; - align-items: center; - gap: 20px; -} - -.avatar { - width: 80px; - height: 80px; - border-radius: 50%; - object-fit: cover; - border: 2px solid #F0F0F2; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3)); -} - -.social-links { - display: flex; - justify-content: center; - gap: 20px; - margin-top: 10px; -} - -.link-logo { - width: 80px; - height: 80px; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.4)); -} - -.user-details { - flex: 1; - position: relative; - top: +5px; -} - -.user-info { - display: flex; - align-items: center; - margin-bottom: 10px; - width: fit-content; -} - -.user-info span { - font-weight: 400; - font-size: 18px; -} - -.status { - display: flex; - align-items: center; - gap: 10px; - margin-bottom: 10px; - width: fit-content; -} - -.status-icon { - width: 10px; - height: 10px; - border-radius: 50%; - display: inline-block; - background-color: gray; -} - -.status-online { - background-color: #43A25A; -} - -.status-idle { - background-color: #CA9654; -} - -.status-dnd { - background-color: #D83A42; -} - -.status-offline { - background-color: #747F8D; -} - -#activity { - width: fit-content; -} - -#youtube, -#twitter, -#mega { - transition: transform 0.15s ease-in-out; -} - -#youtube:hover, -#twitter:hover, -#mega:hover { - cursor: pointer; - transform: scale(1.05); -} - -.track-name { - font-family: "HelveticaNeueMedium", sans-serif; - font-size: 16px; - text-align: center; - margin-bottom: 5px; -} - -.track-album { - font-family: "HelveticaNeueLight", sans-serif; - font-size: 16px; - text-align: center; - margin-bottom: 5px; -} - -.track-artist { - font-family: "HelveticaNeueLight", sans-serif; - font-size: 16px; - text-align: center; -} - -.album-art { - width: 100px; - height: 100px; - border-radius: 15px; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3)); - margin-bottom: 15px; - display: block; - margin-left: auto; - margin-right: auto; -} - -#music-container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; -} - -.song-card-container { - display: flex; - flex-direction: column; - align-items: center; - gap: 5px; - width: inherit; - overflow-y: scroll; - overflow-x: hidden; - max-height: 40vh; - scroll-behavior: smooth; -} - -.song-card { - display: flex; - padding: 10px; - background: #F0F0F2; - border-radius: 15px; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3)); - justify-content: space-evenly; - width: 600px; -} - -.song-cover { - width: 80px; - height: 80px; - border-radius: 10px; - object-fit: cover; - border: 2px solid #F0F0F2; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3)); -} - -.song-title { - font-weight: 600; -} - -.file-size, -.song-length { - font-weight: 300; -} - -.download-icon { - width: 80px; - height: 80px; - filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.4)); - transition: transform 0.15s ease-in-out; -} - -.download-icon:hover { - cursor: pointer; - transform: scale(1.05); -} - -.youtube-embed { - border-radius: 15px; -} \ No newline at end of file diff --git a/img/twitter.png b/twitter.png similarity index 100% rename from img/twitter.png rename to twitter.png diff --git a/img/youtube.png b/youtube.png similarity index 100% rename from img/youtube.png rename to youtube.png