From 9ae9400c37c1a7701abeaa38f5e044ae18b9562d Mon Sep 17 00:00:00 2001 From: ClaytonTDM Date: Wed, 9 Oct 2024 03:12:20 -0400 Subject: [PATCH] add commit link and modify prettier config Signed-off-by: ClaytonTDM --- .prettierrc | 1 - game/cl.html | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.prettierrc b/.prettierrc index 12c5f8d..0e3ffe3 100644 --- a/.prettierrc +++ b/.prettierrc @@ -12,7 +12,6 @@ "printWidth": 80, "proseWrap": "preserve", "quoteProps": "as-needed", - "requirePragma": false, "semi": true, "singleAttributePerLine": false, "singleQuote": false, diff --git a/game/cl.html b/game/cl.html index 5b69eb6..0cb31b6 100644 --- a/game/cl.html +++ b/game/cl.html @@ -18,6 +18,9 @@ commits.forEach((commit) => { const listItem = document.createElement("li"); const itemText = document.createElement("pre"); + const itemLink = document.createElement("a"); + itemLink.href = commit.html_url; + itemLink.target = "_blank"; const authorName = commit.commit.author.name; let committerName = commit.commit.committer.name; const committerLogin = commit.committer.login; @@ -45,7 +48,8 @@ itemText.innerHTML = `${allAuthors}: `; itemText.innerText += commitMessage.split("\n")[0]; commitList.appendChild(listItem); - listItem.appendChild(itemText); + itemLink.appendChild(itemText); + listItem.appendChild(itemLink); }); }) .catch((error) => {