Skip to content

Commit

Permalink
Merge pull request PreMiD#2817 from StrikerFRFX/gtranslate-patch-striker
Browse files Browse the repository at this point in the history
Fix: Google Translate Presence
  • Loading branch information
mergify[bot] authored Jan 19, 2021
2 parents edddb86 + 30cfadc commit 2c9a512
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions websites/G/Google Translate/dist/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
{
"name": "Callum",
"id": "506899274748133376"
},
{
"name": "Striker",
"id": "215509157837537280"
}
],
"service": "Google Translate",
Expand All @@ -17,7 +21,7 @@
},
"url": "translate.google.com",
"regExp": "translate.google([.][a-z]+)+[/]",
"version": "2.0.5",
"version": "2.0.6",
"logo": "https://i.imgur.com/TblAuvW.png",
"thumbnail": "https://i.imgur.com/HSrkJq0.png",
"color": "#4c8bf5",
Expand All @@ -41,4 +45,4 @@
"value": true
}
]
}
}
8 changes: 4 additions & 4 deletions websites/G/Google Translate/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ presence.on("UpdateData", async () => {
largeImageKey: "gt"
};

if (document.location.hash.includes("sl=")) {
type = document.location.hash.split("&")[1];
from = document.location.hash.split("&")[2].replace("sl=", "");
to = document.location.hash.split("&")[3].replace("tl=", "");
if (document.location.search.includes("sl=")) {
type = document.location.search.split("&")[3];
from = document.location.search.split("&")[0].replace("?sl=", "");
to = document.location.search.split("&")[1].replace("tl=", "");
if (type.replace("op=", "") === "translate") {
typet = "Text";
}
Expand Down

0 comments on commit 2c9a512

Please sign in to comment.