Skip to content

Commit

Permalink
chore(NameMC): remove useless await (PreMiD#6701)
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingSunLight42 authored Aug 31, 2022
1 parent 5d83cbb commit f6739e7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion websites/N/NameMC/dist/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"url": "namemc.com",
"regExp": "([a-z0-9-]+[.])*namemc[.]com[/]",
"version": "2.0.9",
"version": "2.0.10",
"logo": "https://i.imgur.com/9JDmZaF.png",
"thumbnail": "https://i.imgur.com/XIZsGTQ.png",
"color": "#000000",
Expand Down
52 changes: 26 additions & 26 deletions websites/N/NameMC/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,28 @@ presence.on("UpdateData", async () => {
[name: string]: PresenceData;
} = {
"/": {
details: (await strings).browse,
details: strings.browse,
},
"/minecraft-names/": {
details: (await strings).names,
details: strings.names,
},
"/minecraft-skins/": {
details: (await strings).skinsFeatured,
details: strings.skinsFeatured,
},
"/minecraft-skins/top/": {
details: (await strings).skinsTop,
details: strings.skinsTop,
},
"/minecraft-skins/new/": {
details: (await strings).skinsNew,
details: strings.skinsNew,
},
"/minecraft-skins/random/": {
details: (await strings).skinsRandom,
details: strings.skinsRandom,
},
"/minecraft-skins/tag/": {
details: (await strings).skinsTagged,
details: strings.skinsTagged,
},
"/minecraft-skins/tag/(\\w*)/": {
details: (await strings).skinsTag.replace(
details: strings.skinsTag.replace(
"{0}",
document
.querySelector("body > main > h1")
Expand All @@ -88,70 +88,70 @@ presence.on("UpdateData", async () => {
),
},
"/capes/": {
details: (await strings).capes,
details: strings.capes,
},
"/cape/": {
details: (await strings).viewCape,
details: strings.viewCape,
state: `${
document
.querySelector(".default-skin main.container h1")
?.textContent.split("\n")[1]
} Cape`,
},
"/minecraft-servers/": {
details: (await strings).servers,
details: strings.servers,
},
"/server/": {
details: (await strings).viewServer,
details: strings.viewServer,
state: document.querySelector(
"body > main > div.row.no-gutters.align-items-center > div.col > h1"
)?.textContent,
buttons: [
{
label: (await strings).buttonViewServer,
label: strings.buttonViewServer,
url: document.URL,
},
],
},
"/claim-your-profile/": {
details: (await strings).claim,
details: strings.claim,
},
"/my-profile/": {
details: (await strings).profileEdit.split("{0}")[0],
state: (await strings).profileEdit.split("{0}")[1],
details: strings.profileEdit.split("{0}")[0],
state: strings.profileEdit.split("{0}")[1],
},
"/my-profile/friends/": {
details: (await strings).viewFriends,
details: strings.viewFriends,
},
"/my-profile/skins/": {
details: (await strings).viewSkins,
details: strings.viewSkins,
},
"/my-profile/emoji/": {
details: (await strings).viewEmoji,
details: strings.viewEmoji,
},
"/profile/": {
details: (await strings).viewProfile,
details: strings.viewProfile,
state: document.querySelector("body > main > h1")?.textContent,
buttons: [
{
label: (await strings).buttonViewProfile,
label: strings.buttonViewProfile,
url: document.URL,
},
],
},
"/privacy/": {
details: (await strings).viewing,
state: (await strings).privacy,
details: strings.viewing,
state: strings.privacy,
},
"/search/": {
details: (await strings).search,
details: strings.search,
state: document.querySelector(
"#status-bar > div > div > div.col-lg-7 > h1 > samp"
)?.textContent,
smallImageKey: "search",
},
"/skin/": {
details: (await strings).viewSkin,
details: strings.viewSkin,
},
};

Expand All @@ -164,7 +164,7 @@ presence.on("UpdateData", async () => {
.match(k)
) {
presenceData.smallImageKey = "reading";
presenceData.smallImageText = (await strings).browse;
presenceData.smallImageText = strings.browse;
presenceData = { ...presenceData, ...v };
}
}
Expand Down

0 comments on commit f6739e7

Please sign in to comment.