Skip to content

Commit 78e134b

Browse files
committed
Update link.js
1 parent 31aecc6 commit 78e134b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api/link.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ const html = `
9292
9393
const isDev = (window.location.hostname === 'dev.codeit.codes');
9494
95-
if (link && !link.startsWith('https://cde.run')
96-
&& !link.startsWith('https://dev.cde.run')) {
95+
if (link && link.startsWith('https:/github.com')) {
9796
98-
if (!isDev) link = 'https://cde.run/' + link;
99-
else link = 'https://dev.cde.run/' + link;
97+
link = link.replace('https:/github.com', 'https://github.com');
10098
10199
}
102100
103-
if (link && link.includes('https:/github.com')) {
101+
if (link && !link.startsWith('https://cde.run')
102+
&& !link.startsWith('https://dev.cde.run')) {
104103
105-
link = link.replace('https:/github.com', 'https://github.com');
104+
if (!isDev) link = 'https://cde.run/' + link;
105+
else link = 'https://dev.cde.run/' + link;
106106
107107
}
108108

0 commit comments

Comments
 (0)