Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Crowdin): fix some broken querySelector #8924

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion websites/C/Crowdin/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
{
"name": "Rodry",
"id": "240875059953139714"
},
{
"name": "Atom Skully",
"id": "671037171611729920"
}
],
"service": "Crowdin",
"description": {
"en": "Crowdin is a cloud-based solution that streamlines localization management for your team.",
"fr": "Crowdin est une solution basée sur le cloud qui rationalise la gestion de la localisation pour votre équipe.",
"ro": "Crowdin este o soluție bazată pe cloud care eficientizează gestionarea localizării pentru echipa ta.",
"nl": "Crowdin is een cloudgebaseerde oplossing die lokalisatiebeheer voor uw team stroomlijnt.",
"vi_VN": "Crowdin là giải pháp trực tuyến cho việc quản lý đội ngũ bản địa hoá của bạn.",
Expand All @@ -27,7 +32,7 @@
"status.crowdin.com",
"blog.crowdin.com"
],
"version": "4.0.10",
"version": "4.0.11",
"logo": "https://cdn.rcd.gg/PreMiD/websites/C/Crowdin/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/C/Crowdin/assets/thumbnail.png",
"color": "#2e3340",
Expand Down
8 changes: 4 additions & 4 deletions websites/C/Crowdin/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ presence.on("UpdateData", async () => {
else {
if (showProject) {
presenceData.details =
document.querySelector(".project-name__title__text")
document.querySelector("a.side-menu__link--active > span")
?.textContent ??
document.querySelector<HTMLAnchorElement>(
"#wrap > div.section.project-page > div > div.clearfix.mb-2 > div > div:nth-child(2) > a"
).outerText;
"#back-end-header .application__header__breadcrumb a:nth-child(3)"
).textContent;
presenceData.buttons = [
{
label: "View project",
Expand Down Expand Up @@ -222,7 +222,7 @@ presence.on("UpdateData", async () => {
presenceData.state = "Viewing project home";
else if (
document.querySelector(
"#wrap > div.section.project-page > div > h1"
".language-container .breadcrumb-item > span"
)
) {
presenceData.state = `${await getLanguageName(
Expand Down