diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 3c1ccb5..7a45ac2 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,18 +1,17 @@
version: 2
updates:
+ # Maintain dependencies for GitHub Actions
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ labels:
+ - "dependencies"
- # Maintain dependencies for GitHub Actions
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "daily"
- labels:
- - "dependencies"
-
- # Maintain dependencies for yarn
- - package-ecosystem: "npm"
- directory: "/"
- schedule:
- interval: "daily"
- labels:
- - "dependencies"
+ # Maintain dependencies for yarn
+ - package-ecosystem: "npm"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ labels:
+ - "dependencies"
diff --git a/.github/workflows/ThemeList.yml b/.github/workflows/ThemeList.yml
index 5bb32c8..bec866c 100644
--- a/.github/workflows/ThemeList.yml
+++ b/.github/workflows/ThemeList.yml
@@ -4,7 +4,7 @@ on:
schedule:
- cron: "0 */24 * * *"
workflow_dispatch:
-
+
jobs:
make-request:
runs-on: ubuntu-latest
diff --git a/app.js b/app.js
index 084339f..7fd36c2 100644
--- a/app.js
+++ b/app.js
@@ -63,7 +63,7 @@ app.get(["/:userId/:themeName", "/:userId"], async (req, res) => {
domain: process.env.DOMAIN,
userId: req.params.userId,
theme: getTheme(
- req.params.themeName ? req.params.themeName : "serika_dark"
+ req.params.themeName ? req.params.themeName : "serika_dark",
),
userData: await getUserData(req.params.userId),
svgUrl: `${process.env.DOMAIN}/generate-svg/${req.params.userId}/${req.params.themeName}?lbpb=true`,
@@ -103,7 +103,7 @@ app.get("/generate-svg/:userId/:themeName", async (req, res) => {
theme,
badge,
leaderBoards,
- personalBests
+ personalBests,
);
res.set("Content-Type", "image/svg+xml");
res.send(svg);
diff --git a/public/script/generateSvg.js b/public/script/generateSvg.js
index 6da0957..0ad46ec 100644
--- a/public/script/generateSvg.js
+++ b/public/script/generateSvg.js
@@ -41,7 +41,7 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
const imagePath = `public/image/userImg/${userData.discordId}-${userData.discordAvatar}.png`;
await downloadUserImg(
`https://cdn.discordapp.com/avatars/${userData.discordId}/${userData.discordAvatar}.png?size=256`,
- imagePath
+ imagePath,
);
// Convert the image file to base64
@@ -349,12 +349,12 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
}
if (pbWords[words[i]].wpm != "-") {
pbWords[words[i]].wpm = Math.round(
- parseFloat(pbWords[words[i]].wpm)
+ parseFloat(pbWords[words[i]].wpm),
);
}
if (pbWords[words[i]].acc != "-") {
pbWords[words[i]].acc = Math.floor(
- parseFloat(pbWords[words[i]].acc)
+ parseFloat(pbWords[words[i]].acc),
);
}
}
@@ -378,8 +378,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbTime["15"].acc}${
- pbTime["15"].acc == "-" ? "" : "%"
- }
+ pbTime["15"].acc == "-" ? "" : "%"
+ }
@@ -394,8 +394,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbTime["30"].acc}${
- pbTime["30"].acc == "-" ? "" : "%"
- }
+ pbTime["30"].acc == "-" ? "" : "%"
+ }
@@ -410,8 +410,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbTime["60"].acc}${
- pbTime["60"].acc == "-" ? "" : "%"
- }
+ pbTime["60"].acc == "-" ? "" : "%"
+ }
@@ -426,8 +426,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbTime["120"].acc}${
- pbTime["120"].acc == "-" ? "" : "%"
- }
+ pbTime["120"].acc == "-" ? "" : "%"
+ }
@@ -452,8 +452,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbWords["10"].acc}${
- pbWords["10"].acc == "-" ? "" : "%"
- }
+ pbWords["10"].acc == "-" ? "" : "%"
+ }
@@ -468,8 +468,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbWords["25"].acc}${
- pbWords["25"].acc == "-" ? "" : "%"
- }
+ pbWords["25"].acc == "-" ? "" : "%"
+ }
@@ -484,8 +484,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbWords["50"].acc}${
- pbWords["50"].acc == "-" ? "" : "%"
- }
+ pbWords["50"].acc == "-" ? "" : "%"
+ }
@@ -500,8 +500,8 @@ async function getSvg(userData, theme, badge, leaderBoards, personalbests) {
${pbWords["100"].acc}${
- pbWords["100"].acc == "-" ? "" : "%"
- }
+ pbWords["100"].acc == "-" ? "" : "%"
+ }
diff --git a/public/script/index.js b/public/script/index.js
index 0d5a4af..ddb6430 100644
--- a/public/script/index.js
+++ b/public/script/index.js
@@ -12,7 +12,7 @@ $("#createNowBtn").click(function () {
{
scrollTop: targetElement.offset().top,
},
- 800
+ 800,
);
});
@@ -62,7 +62,7 @@ $("#generateReadmeBtn").click(function () {
}
$("#previewReadmeLink").attr(
"href",
- `https://monkeytype.com/profile/${monkeytypeName}`
+ `https://monkeytype.com/profile/${monkeytypeName}`,
);
$("#previewReadmeImg").attr("src", url);
updateReadmeCode();
@@ -96,11 +96,11 @@ function initialReadmeBtn(buttonId, buttonState) {
if (!buttonState) {
$(buttonId).removeClass("bg-slate-100 text-gray-400");
$(buttonId).addClass(
- "bg-nord-light-green text-nord-light-bg opacity-60"
+ "bg-nord-light-green text-nord-light-bg opacity-60",
);
} else {
$(buttonId).removeClass(
- "bg-nord-light-green text-nord-light-bg opacity-60"
+ "bg-nord-light-green text-nord-light-bg opacity-60",
);
$(buttonId).addClass("bg-slate-100 text-gray-400");
}
@@ -137,7 +137,7 @@ function showBorder(themeName) {
$(`#${themeListState.themeName}`).css("border", "");
$(`#${themeListState.themeName}`).css(
"border-color",
- themeListState.borderColor
+ themeListState.borderColor,
);
}
$(`#${themeName}`).css("border", `4px solid ${borderColor}`);
@@ -259,7 +259,7 @@ async function themeList() {
themeList[i]["bgColor"],
themeList[j]["bgColor"],
themeList[i]["name"],
- themeList[j]["name"]
+ themeList[j]["name"],
)
) {
let temp = themeList[i];
@@ -280,8 +280,8 @@ async function themeList() {
onclick="showBorder('${themeList[i]["name"]}')">
${themeList[i][
- "name"
- ].replace(/_/g, " ")}
+ "name"
+ ].replace(/_/g, " ")}
`;
$("#themeListContainer").append(html);
diff --git a/public/script/monkeytypeData.js b/public/script/monkeytypeData.js
index 744a7c0..1f0091e 100644
--- a/public/script/monkeytypeData.js
+++ b/public/script/monkeytypeData.js
@@ -46,7 +46,7 @@ function getFaviconTheme() {
name: themesData[i].name,
bgColor: themesData[i].bgColor,
mainColor: themesData[i].mainColor,
- }
+ };
faviconData[i] = data;
}
@@ -108,7 +108,7 @@ async function getMonkeyTypeThemesByName(themeName) {
.then((data) => {
let cssData = data.substring(
data.indexOf("{"),
- data.indexOf("}") + 1
+ data.indexOf("}") + 1,
);
cssData = cssData
@@ -146,14 +146,14 @@ async function getMonkeyTypeBadgesData() {
const content = atob(data.content);
let badgesData = content.slice(
content.search("{"),
- content.search("};") + 1
+ content.search("};") + 1,
);
badgesData = badgesData
.replace(/(\w+)\s*:/g, '"$1":')
.replace(/,(\s*[\]}])/g, "$1")
.replace(
/(\w+:)|(\w+ :)/g,
- (matchedStr) => '"' + matchedStr.replace(/:/g, "") + '":'
+ (matchedStr) => '"' + matchedStr.replace(/:/g, "") + '":',
)
.replace(/\"/g, '"')
.replace(/\"animation\"/g, "animation");
diff --git a/public/script/prism.js b/public/script/prism.js
index 74fcd7c..6dd54ad 100644
--- a/public/script/prism.js
+++ b/public/script/prism.js
@@ -73,7 +73,7 @@ var _self =
setLanguage: function (e, t) {
(e.className = e.className.replace(
RegExp(n, "gi"),
- ""
+ "",
)),
e.classList.add("language-" + t);
},
@@ -85,7 +85,7 @@ var _self =
throw new Error();
} catch (r) {
var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(
- r.stack
+ r.stack,
) || [])[1];
if (e) {
var n = document.getElementsByTagName("script");
@@ -162,7 +162,7 @@ var _self =
};
a.hooks.run("before-highlightall", r),
(r.elements = Array.prototype.slice.apply(
- r.container.querySelectorAll(r.selector)
+ r.container.querySelectorAll(r.selector),
)),
a.hooks.run("before-all-elements-highlight", r);
for (var i, l = 0; (i = r.elements[l++]); )
@@ -213,7 +213,7 @@ var _self =
language: s.language,
code: s.code,
immediateClose: !0,
- })
+ }),
);
} else u(a.highlight(s.code, s.grammar, s.language));
else u(a.util.encode(s.code));
@@ -222,7 +222,7 @@ var _self =
var r = { code: e, grammar: n, language: t };
if ((a.hooks.run("before-tokenize", r), !r.grammar))
throw new Error(
- 'The language "' + r.language + '" has no grammar.'
+ 'The language "' + r.language + '" has no grammar.',
);
return (
(r.tokens = a.tokenize(r.code, r.grammar)),
@@ -340,7 +340,12 @@ var _self =
(w = u(
n,
z,
- new i(f, p ? a.tokenize(N, p) : N, k, N)
+ new i(
+ f,
+ p ? a.tokenize(N, p) : N,
+ k,
+ N,
+ ),
)),
M && u(n, w, M),
L > 1)
@@ -433,7 +438,7 @@ var _self =
e.postMessage(a.highlight(i, a.languages[r], r)),
l && e.close();
},
- !1
+ !1,
),
a)
: a;
@@ -544,9 +549,9 @@ var _self =
/__/g,
function () {
return a;
- }
+ },
),
- "i"
+ "i",
),
lookbehind: !0,
greedy: !0,
@@ -562,7 +567,7 @@ var _self =
"(^|[\"'\\s])(?:" +
a +
")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))",
- "i"
+ "i",
),
lookbehind: !0,
inside: {
@@ -603,7 +608,7 @@ var _self =
pattern: RegExp(
"@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|" +
e.source +
- ")*?(?:;|(?=\\s*\\{))"
+ ")*?(?:;|(?=\\s*\\{))",
),
inside: {
rule: /^@[\w-]+/,
@@ -624,7 +629,7 @@ var _self =
"\\burl\\((?:" +
e.source +
"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)",
- "i"
+ "i",
),
greedy: !0,
inside: {
@@ -637,7 +642,7 @@ var _self =
pattern: RegExp(
"(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" +
e.source +
- ")*(?=\\s*\\{)"
+ ")*(?=\\s*\\{)",
),
lookbehind: !0,
},
@@ -706,7 +711,7 @@ Prism.languages.clike = {
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
number: {
pattern: RegExp(
- "(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"
+ "(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])",
),
lookbehind: !0,
},
@@ -718,7 +723,7 @@ Prism.languages.clike = {
Prism.languages.insertBefore("javascript", "keyword", {
regex: {
pattern: RegExp(
- "((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"
+ "((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))",
),
lookbehind: !0,
greedy: !0,
@@ -809,7 +814,7 @@ Prism.languages.clike = {
(Prism.languages.markup.tag.addInlined("script", "javascript"),
Prism.languages.markup.tag.addAttribute(
"on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)",
- "javascript"
+ "javascript",
)),
(Prism.languages.js = Prism.languages.javascript);
!(function (e) {
@@ -831,7 +836,7 @@ Prism.languages.clike = {
//g,
function () {
return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
- }
+ },
),
d = "\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";
function o(e, n) {
@@ -853,8 +858,8 @@ Prism.languages.clike = {
/<>/g,
function () {
return t;
- }
- )
+ },
+ ),
),
lookbehind: !0,
alias: "string",
@@ -868,7 +873,7 @@ Prism.languages.clike = {
})
.replace(/<>/g, function () {
return "(?:" + a + "|" + d + ")";
- })
+ }),
),
lookbehind: !0,
greedy: !0,
@@ -881,7 +886,7 @@ Prism.languages.clike = {
},
datetime: {
pattern: o(
- "\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"
+ "\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?",
),
lookbehind: !0,
alias: "number",
@@ -896,7 +901,7 @@ Prism.languages.clike = {
number: {
pattern: o(
"[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)",
- "i"
+ "i",
),
lookbehind: !0,
},
@@ -974,7 +979,7 @@ Prism.languages.clike = {
if (!((n = Math.min(b + d, n)) < i)) {
var r =
o.querySelector(
- '.line-highlight[data-range="' + e + '"]'
+ '.line-highlight[data-range="' + e + '"]',
) || document.createElement("div");
if (
(v.push(function () {
@@ -1010,7 +1015,7 @@ Prism.languages.clike = {
r.setAttribute("data-end", String(n)),
(r.style.top = (i - d - 1) * f + A + "px"),
(r.textContent = new Array(n - i + 2).join(
- " \n"
+ " \n",
));
});
v.push(function () {
@@ -1110,7 +1115,7 @@ Prism.languages.clike = {
Prism.plugins.lineHighlight.highlightLines(
n,
t,
- "temporary "
+ "temporary ",
)(),
r &&
document
@@ -1131,7 +1136,7 @@ Prism.languages.clike = {
var r =
parseInt(
n.getAttribute("data-start"),
- 10
+ 10,
) || 1,
s = r + (i.children.length - 1);
t < r && (t = r), t > s && (t = s);
@@ -1151,8 +1156,8 @@ Prism.languages.clike = {
((i = window.innerWidth),
r(
Array.prototype.slice.call(
- document.querySelectorAll("pre.line-numbers")
- )
+ document.querySelectorAll("pre.line-numbers"),
+ ),
));
}),
Prism.hooks.add("complete", function (t) {
@@ -1172,7 +1177,7 @@ Prism.languages.clike = {
u = new Array(a + 1).join("");
(l = document.createElement("span")).setAttribute(
"aria-hidden",
- "true"
+ "true",
),
(l.className = "line-numbers-rows"),
(l.innerHTML = u),
@@ -1181,7 +1186,7 @@ Prism.languages.clike = {
"linenumber " +
(parseInt(
s.getAttribute("data-start"),
- 10
+ 10,
) -
1)),
t.element.appendChild(l),
@@ -1244,7 +1249,7 @@ Prism.languages.clike = {
t.forEach(function (e, t) {
if (e && e.length > 1) {
var s = n.appendChild(
- document.createElement("span")
+ document.createElement("span"),
);
(s.style.display = "block"), (s.textContent = e);
} else i[t] = r;
@@ -1289,13 +1294,13 @@ Prism.languages.clike = {
"function" == typeof a.onClick
? (((t =
document.createElement(
- "button"
+ "button",
)).type = "button"),
t.addEventListener(
"click",
function () {
a.onClick.call(this, e);
- }
+ },
))
: "string" == typeof a.url
? ((t =
@@ -1311,7 +1316,7 @@ Prism.languages.clike = {
? console.warn(
'There is a button with the key "' +
n +
- '" registered already.'
+ '" registered already.',
)
: e.push((t[n] = r));
}),
@@ -1776,9 +1781,9 @@ Prism.languages.clike = {
(r.textContent = n[t]),
c.setAttribute("data-copy-state", t);
}
- }
+ },
)
: console.warn(
- "Copy to Clipboard plugin loaded before Toolbar plugin."
+ "Copy to Clipboard plugin loaded before Toolbar plugin.",
));
})();
diff --git a/public/views/favicon.ejs b/public/views/favicon.ejs
index 38ae7cd..27e34b4 100644
--- a/public/views/favicon.ejs
+++ b/public/views/favicon.ejs
@@ -4,7 +4,7 @@
- monkeytype favicon
+ MonkeyType Favicon
diff --git a/public/views/index.ejs b/public/views/index.ejs
index 73ba3fb..b74d8ee 100644
--- a/public/views/index.ejs
+++ b/public/views/index.ejs
@@ -4,7 +4,7 @@
- MT Readme
+ MonkeyType Readme
diff --git a/public/views/user.ejs b/public/views/user.ejs
index 8b10366..c5c1535 100644
--- a/public/views/user.ejs
+++ b/public/views/user.ejs
@@ -5,7 +5,7 @@
- MT Readme
+ MonkeyType Readme