diff --git a/websites/S/Sorryfield/metadata.json b/websites/S/Sorryfield/metadata.json index 113b7b4e7b9d..11048d95672d 100644 --- a/websites/S/Sorryfield/metadata.json +++ b/websites/S/Sorryfield/metadata.json @@ -2,7 +2,7 @@ "$schema": "https://schemas.premid.app/metadata/1.10", "author": { "id": "741973166364164099", - "name": "ihah" + "name": "rai_ny._." }, "service": "Sorryfield", "altnames": [ @@ -13,7 +13,7 @@ "ko_KR": "쏘리들은 노래방 곡 목록 사이트입니다. 그리고 리듬 게임 자바!를 플레이 할 수 있습니다." }, "url": "sorry.daldal.so", - "version": "1.2.2", + "version": "1.2.3", "logo": "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/logo.png", "thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/thumbnail.png", "color": "#1b3058", diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index e92f92dbd2f2..74e2ff8166a2 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -6,16 +6,14 @@ const enum Assets { Logo = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/logo.png", ChartSearch = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/0.jpg", ChartHypoRanked = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/1.jpg", - ChartExponential = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/2.jpg", - ChartHard = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/3.jpg", - ChartIntermediate = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/4.jpg", - ChartEasy = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/5.jpg", + ChartByDifficulty = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/4.jpg", ChartNew = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/6.jpg", ChartHistory = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/7.jpg", ChartPossession = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/8.jpg", ChartHot = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/9.jpg", ChartCold = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/10.jpg", ChartMultiPlayer = "https://cdn.rcd.gg/PreMiD/websites/S/Sorryfield/assets/11.jpg", + ChartSpotlighted = "https://i.imgur.com/Tr2BDaQ.png", } presence.on("UpdateData", async () => { @@ -150,21 +148,19 @@ presence.on("UpdateData", async () => { imageKey = Assets.ChartHypoRanked; menuName = "내 순위가 아래인 채보"; break; - case "EXPONENTIAL": - imageKey = Assets.ChartExponential; - menuName = "경지에 다다른 채보"; - break; - case "HARD": - imageKey = Assets.ChartHard; - menuName = "어려운 채보"; - break; - case "INTERMEDIATE": - imageKey = Assets.ChartIntermediate; - menuName = "적당한 채보"; - break; - case "EASY": - imageKey = Assets.ChartEasy; - menuName = "쉬운 채보"; + case "BY_DIFFICULTY": + imageKey = Assets.ChartByDifficulty; + menuName = "전체 채보"; + for (let i = 0; i < 32; i++) { + if ( + document + .querySelectorAll(".difficulty-bar>.item") + [i].getAttribute("data-active") === "true" + ) { + menuName = `난도 ${i === 31 ? "30+" : i.toString()} 채보`; + break; + } + } break; case "NEW": imageKey = Assets.ChartNew; @@ -186,13 +182,29 @@ presence.on("UpdateData", async () => { imageKey = Assets.ChartCold; menuName = "요즘 안 북적이는 채보"; break; + case "SPOTLIGHTED": + imageKey = Assets.ChartSpotlighted; + menuName = "오늘의 픽"; + break; case "MULTIPLAYER": imageKey = Assets.ChartMultiPlayer; presenceData.details = "자바! 멀티플레이어"; presenceData.state = "방 선택 중"; break; } - if (menuName !== "") presenceData.state = `채보 선택 중: ${menuName}`; + if (menuName !== "") { + presenceData.state = `${ + document + .querySelector(".mode-selection>.body>.mode-串") + .classList.contains("active") + ? "串" + : document + .querySelector(".mode-selection>.body>.mode-本") + .classList.contains("active") + ? "本" + : "雙" + } 채보 선택 중: ${menuName}`; + } presenceData.largeImageKey = imageKey; presenceData.buttons = [{ label: "자바! 플레이하기", url: href }]; @@ -227,7 +239,11 @@ presence.on("UpdateData", async () => { presenceData.buttons = [{ label: "리플레이 보기", url: href }]; } else if (pathname.includes("/shop")) presenceData.state = "상점"; else if (pathname.includes("/sync")) presenceData.state = "환경 설정"; - else if (pathname === "/java/multiplayer") { + else if (pathname.includes("/ranking")) { + presenceData.state = `${ + document.querySelector("h2").textContent + } 모드 짬 랭킹`; + } else if (pathname === "/java/multiplayer") { presenceData.details = "자바! 멀티플레이어"; presenceData.largeImageKey = Assets.ChartMultiPlayer; if (document.querySelector(".room-header")) {