Skip to content

Commit 7229806

Browse files
committed
Update link.js
1 parent 0dc092f commit 7229806

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/link.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,21 @@ const html = `
112112
113113
const isDev = (window.location.hostname === 'dev.codeit.codes');
114114
115+
115116
if (link && link.startsWith('https://codeit.codes/api/link?url=')) {
116117
117118
link = link.replace('https://codeit.codes/api/link?url=', 'https://cde.run/');
118119
119120
}
120121
122+
121123
if (link && link.includes('https:/github.com')) {
122124
123125
link = link.replace('https:/github.com', 'https://github.com');
124126
125127
}
126128
129+
127130
if (link && !link.startsWith('https://cde.run')
128131
&& !link.startsWith('https://dev.cde.run')) {
129132
@@ -132,6 +135,7 @@ const html = `
132135
133136
}
134137
138+
135139
if (link && link.startsWith('https://cde.run/github.com/')) {
136140
137141
link = link.replace('https://cde.run/github.com/', 'https://cde.run/');
@@ -144,6 +148,7 @@ const html = `
144148
145149
}
146150
151+
147152
if (link && notLiveView) {
148153
149154
link += '?live=false';

0 commit comments

Comments
 (0)