From 167ff8f373393a9d182dccdcf4607e449f85bd69 Mon Sep 17 00:00:00 2001 From: Joppe Koers <31915428+SirMorfield@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:50:36 +0200 Subject: [PATCH] fix: remove redundant "42cursus-" prefix On for example the "scop" project Intra prefixes names it "42cursus-scop --- features/projects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/projects.js b/features/projects.js index 1368bf9..6c96fd8 100644 --- a/features/projects.js +++ b/features/projects.js @@ -80,7 +80,7 @@ function addProjectExtras() { if (window.location.pathname.indexOf("/projects/") > -1) { projectNameIndex = 2; } - const projectName = window.location.pathname.split("/")[projectNameIndex].replaceAll(' ', '-'); + const projectName = window.location.pathname.split("/")[projectNameIndex].replaceAll(' ', '-').replace("42cursus-", ""); extrasList.appendChild(createExtraItem("icon-user-search-1", "https://find-peers.joppekoers.nl/#" + projectName, "Find peers", "Find peers that are working on this project at your campus")); // add MLX42 link on project pages that use the MiniLibX library