From 1845a8aaa85efd1c7a1ac367cf1d1f009a5a115d Mon Sep 17 00:00:00 2001 From: Rohid Date: Sat, 17 Aug 2024 11:53:25 +0600 Subject: [PATCH] fix: return entire url when loggingType is `entire url` issue #235 --- src/core/WakaTimeCore.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/WakaTimeCore.ts b/src/core/WakaTimeCore.ts index f07d938..266a875 100644 --- a/src/core/WakaTimeCore.ts +++ b/src/core/WakaTimeCore.ts @@ -237,15 +237,6 @@ class WakaTimeCore { .replace(cleanLine.substring(projectIndicatorIndex), '') .replace(/\/$/, ''); } - const schemaHttpExists = url.match(/^http:\/\//i); - const schemaHttpsExists = url.match(/^https:\/\//i); - let schema = ''; - if (schemaHttpExists) { - schema = 'http://'; - } - if (schemaHttpsExists) { - schema = 'https://'; - } const cleanUrl = url .trim() .replace(/(\/|@@)$/, '') @@ -254,7 +245,7 @@ class WakaTimeCore { if (startsWithUrl) { return { project: projectName, - url: schema + urlFromLine, + url, }; } @@ -264,7 +255,7 @@ class WakaTimeCore { if (lineRe.test(url)) { return { project: null, - url: schema + urlFromLine, + url, }; } }