From 408d1eecaefeaccd1259bc8fff42a8a55c9a63bb Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Sun, 5 May 2024 16:16:42 +0900 Subject: [PATCH 1/7] feat: Corresponding to Sorryfield 1.11.0 update --- websites/S/Sorryfield/metadata.json | 4 ++-- websites/S/Sorryfield/presence.ts | 36 +++++++++++++---------------- 2 files changed, 18 insertions(+), 22 deletions(-) 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..deecc76fdb5e 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/jfS5s7A.png" } presence.on("UpdateData", async () => { @@ -150,21 +148,15 @@ 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 +178,17 @@ 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 }]; From a7254e30f03932086162dbd6e39dd38d8c00db8e Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Sun, 5 May 2024 16:21:18 +0900 Subject: [PATCH 2/7] fix: ran pritter --- websites/S/Sorryfield/presence.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index deecc76fdb5e..b70d847684a7 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -13,7 +13,7 @@ const enum Assets { 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/jfS5s7A.png" + ChartSpotlighted = "https://i.imgur.com/jfS5s7A.png", } presence.on("UpdateData", async () => { @@ -151,8 +151,12 @@ presence.on("UpdateData", async () => { 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") { + 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; } @@ -188,7 +192,18 @@ presence.on("UpdateData", async () => { presenceData.state = "방 선택 중"; break; } - if (menuName !== "") presenceData.state = `${document.querySelector(".mode-selection>.body>.mode-串").classList.contains("active") ? "串" : document.querySelector(".mode-selection>.body>.mode-本").classList.contains("active") ? "本" : "雙"} 채보 선택 중: ${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 }]; From ea0eb98edf81c04ea8c5d01989955c389a5f99a9 Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Sun, 5 May 2024 16:26:35 +0900 Subject: [PATCH 3/7] fix: expected code --- websites/S/Sorryfield/presence.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index b70d847684a7..843912434db8 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -192,7 +192,7 @@ presence.on("UpdateData", async () => { presenceData.state = "방 선택 중"; break; } - if (menuName !== "") + if (menuName !== "") { presenceData.state = `${ document .querySelector(".mode-selection>.body>.mode-串") @@ -204,6 +204,7 @@ presence.on("UpdateData", async () => { ? "本" : "雙" } 채보 선택 중: ${menuName}`; + } presenceData.largeImageKey = imageKey; presenceData.buttons = [{ label: "자바! 플레이하기", url: href }]; From 7d22d267421f89d31fb3bc0df6de64f469ae2749 Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Mon, 6 May 2024 11:51:34 +0900 Subject: [PATCH 4/7] fix: assets edited Signed-off-by: Dongwan Seo --- websites/S/Sorryfield/presence.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index 843912434db8..635321a44e33 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -13,7 +13,7 @@ const enum Assets { 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/jfS5s7A.png", + ChartSpotlighted = "https://i.imgur.com/GrClrlG.png", } presence.on("UpdateData", async () => { From fed209e1e77f1670f32175e2141bfa8a4e00f9d6 Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Mon, 6 May 2024 14:53:29 +0900 Subject: [PATCH 5/7] feat: 1.11.1 update Signed-off-by: Dongwan Seo --- websites/S/Sorryfield/presence.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index 635321a44e33..310834c82dfe 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -239,6 +239,10 @@ 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.includes("/ranking")) + presenceData.state = `${ + document.querySelector("h2").textContent + } 모드 짬 랭킹`; else if (pathname === "/java/multiplayer") { presenceData.details = "자바! 멀티플레이어"; presenceData.largeImageKey = Assets.ChartMultiPlayer; From 8e54221fe721903867da39e86626017a7f06de92 Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Mon, 6 May 2024 14:56:06 +0900 Subject: [PATCH 6/7] fix: expected code Signed-off-by: Dongwan Seo --- websites/S/Sorryfield/presence.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index 310834c82dfe..e192b59a83cc 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -239,11 +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.includes("/ranking")) + else if (pathname.includes("/ranking")) { presenceData.state = `${ document.querySelector("h2").textContent } 모드 짬 랭킹`; - else if (pathname === "/java/multiplayer") { + } else if (pathname === "/java/multiplayer") { presenceData.details = "자바! 멀티플레이어"; presenceData.largeImageKey = Assets.ChartMultiPlayer; if (document.querySelector(".room-header")) { From 9f0e334db29b464957902a16aca18be3c2f0bd71 Mon Sep 17 00:00:00 2001 From: Dongwan Seo Date: Tue, 7 May 2024 21:08:50 +0900 Subject: [PATCH 7/7] fix: asset edited Signed-off-by: Dongwan Seo --- websites/S/Sorryfield/presence.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/S/Sorryfield/presence.ts b/websites/S/Sorryfield/presence.ts index e192b59a83cc..74e2ff8166a2 100644 --- a/websites/S/Sorryfield/presence.ts +++ b/websites/S/Sorryfield/presence.ts @@ -13,7 +13,7 @@ const enum Assets { 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/GrClrlG.png", + ChartSpotlighted = "https://i.imgur.com/Tr2BDaQ.png", } presence.on("UpdateData", async () => {